src/Entity/Begraafplaats.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\BegraafplaatsRepository;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassBegraafplaatsRepository::class)]
  7. class Begraafplaats
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column(length255)]
  14.     private ?string $naam null;
  15.     #[ORM\Column(length25)]
  16.     private ?string $codenaam null;
  17.     #[ORM\Column(length255nullabletrue)]
  18.     private ?string $adres null;
  19.     #[ORM\Column(length15nullabletrue)]
  20.     private ?string $postcode null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $plaats null;
  23.     #[ORM\OneToMany(mappedBy'begraafplaats'targetEntityOrder::class)]
  24.     private Collection $orders;
  25.     public function __toString(): string
  26.     {
  27.         return $this->naam;
  28.     }
  29.     public function getId(): ?int
  30.     {
  31.         return $this->id;
  32.     }
  33.     public function getNaam(): ?string
  34.     {
  35.         return $this->naam;
  36.     }
  37.     public function setNaam(string $naam): self
  38.     {
  39.         $this->naam $naam;
  40.         return $this;
  41.     }
  42.     public function getCodenaam(): ?string
  43.     {
  44.         return $this->codenaam;
  45.     }
  46.     public function setCodenaam(string $codenaam): self
  47.     {
  48.         $this->codenaam $codenaam;
  49.         return $this;
  50.     }
  51.     public function getAdres(): ?string
  52.     {
  53.         return $this->adres;
  54.     }
  55.     public function setAdres(?string $adres): self
  56.     {
  57.         $this->adres $adres;
  58.         return $this;
  59.     }
  60.     public function getPostcode(): ?string
  61.     {
  62.         return $this->postcode;
  63.     }
  64.     public function setPostcode(?string $postcode): self
  65.     {
  66.         $this->postcode $postcode;
  67.         return $this;
  68.     }
  69.     public function getPlaats(): ?string
  70.     {
  71.         return $this->plaats;
  72.     }
  73.     public function setPlaats(?string $plaats): self
  74.     {
  75.         $this->plaats $plaats;
  76.         return $this;
  77.     }
  78.     /**
  79.      * @return Collection<int, Order>
  80.      */
  81.     public function getOrders(): Collection
  82.     {
  83.         return $this->orders;
  84.     }
  85.     public function addOrder(Order $order): self
  86.     {
  87.         if (!$this->orders->contains($order)) {
  88.             $this->orders->add($order);
  89.             $order->setBegraafplaats($this);
  90.         }
  91.         return $this;
  92.     }
  93.     public function removeOrder(Order $order): self
  94.     {
  95.         if ($this->orders->removeElement($order)) {
  96.             // set the owning side to null (unless already changed)
  97.             if ($order->getBegraafplaats() === $this) {
  98.                 $order->setBegraafplaats(null);
  99.             }
  100.         }
  101.         return $this;
  102.     }
  103. }