<?phpnamespace App\Entity;use App\Repository\ParkingRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;use Doctrine\ORM\Mapping\HasLifecycleCallbacks;#[ORM\Entity(repositoryClass: ParkingRepository::class)]#[HasLifecycleCallbacks]class Parking{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 45)] private ?string $name = null; #[ORM\Column(length: 45)] private ?string $address = null; #[ORM\Column(length: 45)] private ?string $phone = null; #[ORM\Column(length: 45)] private ?string $type = null; #[ORM\Column(length: 45)] private ?string $vehicle = null; #[ORM\Column(length: 45)] private ?string $license_plate = null; #[ORM\Column(length: 145, nullable: true)] private ?string $comment = null; #[ORM\ManyToMany(targetEntity: ParkingMatrixRaw::class, mappedBy: 'owner')] private Collection $parkingMatrixRaws; public function __construct() { $this->day = new ArrayCollection(); $this->parkingMatrixRaws = new ArrayCollection(); } public function __toString() { return $this->name; } #[ORM\Column] private ?\DateTimeImmutable $createdAt = null; #[ORM\Column] private ?\DateTimeImmutable $updatedAt = null; #[ORM\Column(nullable: true)] private ?bool $authorized = null; #[ORM\Column(nullable: true)] private ?bool $usage_concent = null; #[ORM\Column(nullable: true)] private ?bool $blocked = null; #[ORM\Column(length: 120, nullable: true)] private ?string $filename = null; public function getCreatedAt(): ?\DateTimeImmutable { return $this->createdAt; } public function setCreatedAt(\DateTimeImmutable $createdAt): self { $this->createdAt = $createdAt; return $this; } public function getUpdatedAt(): ?\DateTimeImmutable { return $this->updatedAt; } public function setUpdatedAt(\DateTimeImmutable $updatedAt): self { $this->updatedAt = $updatedAt; return $this; } #[ORM\PrePersist] public function setCreatedAtValue(): void { $this->createdAt = new \DateTimeImmutable(); $this->setUpdatedAtValue(); } #[ORM\PreUpdate] public function setUpdatedAtValue(): void { $this->updatedAt = new \DateTimeImmutable(); } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): static { $this->name = $name; return $this; } public function getAddress(): ?string { return $this->address; } public function setAddress(string $address): static { $this->address = $address; return $this; } public function getPhone(): ?string { return $this->phone; } public function setPhone(string $phone): static { $this->phone = $phone; return $this; } public function getType(): ?string { return $this->type; } public function setType(string $type): static { $this->type = $type; return $this; } public function getVehicle(): ?string { return $this->vehicle; } public function setVehicle(string $vehicle): static { $this->vehicle = $vehicle; return $this; } public function getLicensePlate(): ?string { return $this->license_plate; } public function setLicensePlate(string $license_plate): static { $this->license_plate = $license_plate; return $this; } public function getComment(): ?string { return $this->comment; } public function setComment(?string $comment): static { $this->comment = $comment; return $this; } /** * @return Collection<int, ParkingMatrixRaw> */ public function getParkingMatrixRaws(): Collection { return $this->parkingMatrixRaws; } public function addParkingMatrixRaw(ParkingMatrixRaw $parkingMatrixRaw): static { if (!$this->parkingMatrixRaws->contains($parkingMatrixRaw)) { $this->parkingMatrixRaws->add($parkingMatrixRaw); $parkingMatrixRaw->addOwner($this); } return $this; } public function removeParkingMatrixRaw(ParkingMatrixRaw $parkingMatrixRaw): static { if ($this->parkingMatrixRaws->removeElement($parkingMatrixRaw)) { $parkingMatrixRaw->removeOwner($this); } return $this; } public function isAuthorized(): ?bool { return $this->authorized; } public function setAuthorized(?bool $authorized): static { $this->authorized = $authorized; return $this; } public function isUsageConcent(): ?bool { return $this->usage_concent; } public function setUsageConcent(?bool $usage_concent): static { $this->usage_concent = $usage_concent; return $this; } public function isBlocked(): ?bool { return $this->blocked; } public function setBlocked(?bool $blocked): static { $this->blocked = $blocked; return $this; } public function getFilename(): ?string { return $this->filename; } public function setFilename(?string $filename): static { $this->filename = $filename; return $this; }}