src/Entity/ParkingMatrixRaw.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ParkingMatrixRawRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassParkingMatrixRawRepository::class)]
  8. class ParkingMatrixRaw
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\ManyToMany(targetEntityParking::class, inversedBy'parkingMatrixRaws')]
  15.     private Collection $owner;
  16.     #[ORM\ManyToMany(targetEntityDays::class, inversedBy'parkingMatrixRaws')]
  17.     private Collection $day;
  18.     #[ORM\ManyToMany(targetEntityDayTime::class, inversedBy'parkingMatrixRaws')]
  19.     private Collection $daytime;
  20.     #[ORM\Column(nullabletrue)]
  21.     private ?bool $isparked null;
  22.     public function __construct()
  23.     {
  24.         $this->owner = new ArrayCollection();
  25.         $this->day = new ArrayCollection();
  26.         $this->daytime = new ArrayCollection();
  27.     }
  28.     public function getId(): ?int
  29.     {
  30.         return $this->id;
  31.     }
  32.     public function __toString()
  33.     {
  34.         return $this->getId();
  35.     }
  36.     /**
  37.      * @return Collection<int, Parking>
  38.      */
  39.     public function getOwner(): Collection
  40.     {
  41.         return $this->owner;
  42.     }
  43.     public function addOwner(Parking $owner): static
  44.     {
  45.         if (!$this->owner->contains($owner)) {
  46.             $this->owner->add($owner);
  47.         }
  48.         return $this;
  49.     }
  50.     public function removeOwner(Parking $owner): static
  51.     {
  52.         $this->owner->removeElement($owner);
  53.         return $this;
  54.     }
  55.     /**
  56.      * @return Collection<int, Days>
  57.      */
  58.     public function getDay(): Collection
  59.     {
  60.         return $this->day;
  61.     }
  62.     public function addDay(Days $day): static
  63.     {
  64.         if (!$this->day->contains($day)) {
  65.             $this->day->add($day);
  66.         }
  67.         return $this;
  68.     }
  69.     public function removeDay(Days $day): static
  70.     {
  71.         $this->day->removeElement($day);
  72.         return $this;
  73.     }
  74.     /**
  75.      * @return Collection<int, DayTime>
  76.      */
  77.     public function getDaytime(): Collection
  78.     {
  79.         return $this->daytime;
  80.     }
  81.     public function addDaytime(DayTime $daytime): static
  82.     {
  83.         if (!$this->daytime->contains($daytime)) {
  84.             $this->daytime->add($daytime);
  85.         }
  86.         return $this;
  87.     }
  88.     public function removeDaytime(DayTime $daytime): static
  89.     {
  90.         $this->daytime->removeElement($daytime);
  91.         return $this;
  92.     }
  93.     public function isIsparked(): ?bool
  94.     {
  95.         return $this->isparked;
  96.     }
  97.     public function setIsparked(?bool $isparked): static
  98.     {
  99.         $this->isparked $isparked;
  100.         return $this;
  101.     }
  102. }