src/Entity/Relatie.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\RelatieRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassRelatieRepository::class)]
  8. class Relatie
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255)]
  15.     private ?string $naam null;
  16.     #[ORM\Column(length255nullabletrue)]
  17.     private ?string $wadres null;
  18.     #[ORM\Column(length15nullabletrue)]
  19.     private ?string $wpostcode null;
  20.     #[ORM\Column(length255nullabletrue)]
  21.     private ?string $wwoonplaats null;
  22.     #[ORM\Column(length15nullabletrue)]
  23.     private ?string $telefoon null;
  24.     #[ORM\Column(length255nullabletrue)]
  25.     private ?string $email null;
  26.     #[ORM\Column(length255nullabletrue)]
  27.     private ?string $padres null;
  28.     #[ORM\Column(length15nullabletrue)]
  29.     private ?string $ppostcode null;
  30.     #[ORM\Column(length255nullabletrue)]
  31.     private ?string $pwoonplaats null;
  32.     #[ORM\OneToMany(mappedBy'relatie'targetEntityOrder::class)]
  33.     private Collection $orders;
  34.     #[ORM\OneToMany(mappedBy'relatie'targetEntityProspect::class)]
  35.     private Collection $prospects;
  36.     public function __construct()
  37.     {
  38.         $this->orders = new ArrayCollection();
  39.         $this->prospects = new ArrayCollection();
  40.     }
  41.     public function __toString()
  42.     {
  43.         return($this->naam.', '.$this->wwoonplaats);
  44.     }
  45.     
  46.     
  47.     public function getId(): ?int
  48.     {
  49.         return $this->id;
  50.     }
  51.     public function getNaam(): ?string
  52.     {
  53.         return $this->naam;
  54.     }
  55.     public function setNaam(string $naam): self
  56.     {
  57.         $this->naam $naam;
  58.         return $this;
  59.     }
  60.     public function getWadres(): ?string
  61.     {
  62.         return $this->wadres;
  63.     }
  64.     public function setWadres(?string $wadres): self
  65.     {
  66.         $this->wadres $wadres;
  67.         return $this;
  68.     }
  69.     public function getWpostcode(): ?string
  70.     {
  71.         return $this->wpostcode;
  72.     }
  73.     public function setWpostcode(?string $wpostcode): self
  74.     {
  75.         $this->wpostcode $wpostcode;
  76.         return $this;
  77.     }
  78.     public function getWwoonplaats(): ?string
  79.     {
  80.         return $this->wwoonplaats;
  81.     }
  82.     public function setWwoonplaats(?string $wwoonplaats): self
  83.     {
  84.         $this->wwoonplaats $wwoonplaats;
  85.         return $this;
  86.     }
  87.     public function getTelefoon(): ?string
  88.     {
  89.         return $this->telefoon;
  90.     }
  91.     public function setTelefoon(?string $telefoon): self
  92.     {
  93.         $this->telefoon $telefoon;
  94.         return $this;
  95.     }
  96.     public function getEmail(): ?string
  97.     {
  98.         return $this->email;
  99.     }
  100.     public function setEmail(?string $email): self
  101.     {
  102.         $this->email $email;
  103.         return $this;
  104.     }
  105.     public function getPadres(): ?string
  106.     {
  107.         return $this->padres;
  108.     }
  109.     public function setPadres(?string $padres): self
  110.     {
  111.         $this->padres $padres;
  112.         return $this;
  113.     }
  114.     public function getPpostcode(): ?string
  115.     {
  116.         return $this->ppostcode;
  117.     }
  118.     public function setPpostcode(?string $ppostcode): self
  119.     {
  120.         $this->ppostcode $ppostcode;
  121.         return $this;
  122.     }
  123.     public function getPwoonplaats(): ?string
  124.     {
  125.         return $this->pwoonplaats;
  126.     }
  127.     public function setPwoonplaats(?string $pwoonplaats): self
  128.     {
  129.         $this->pwoonplaats $pwoonplaats;
  130.         return $this;
  131.     }
  132.     /**
  133.      * @return Collection<int, Order>
  134.      */
  135.     public function getOrders(): Collection
  136.     {
  137.         return $this->orders;
  138.     }
  139.     public function addOrder(Order $order): self
  140.     {
  141.         if (!$this->orders->contains($order)) {
  142.             $this->orders->add($order);
  143.             $order->setRelatie($this);
  144.         }
  145.         return $this;
  146.     }
  147.     public function removeOrder(Order $order): self
  148.     {
  149.         if ($this->orders->removeElement($order)) {
  150.             // set the owning side to null (unless already changed)
  151.             if ($order->getRelatie() === $this) {
  152.                 $order->setRelatie(null);
  153.             }
  154.         }
  155.         return $this;
  156.     }
  157.     /**
  158.      * @return Collection<int, Prospect>
  159.      */
  160.     public function getProspects(): Collection
  161.     {
  162.         return $this->prospects;
  163.     }
  164.     public function addProspect(Prospect $prospect): self
  165.     {
  166.         if (!$this->prospects->contains($prospect)) {
  167.             $this->prospects->add($prospect);
  168.             $prospect->setRelatie($this);
  169.         }
  170.         return $this;
  171.     }
  172.     public function removeProspect(Prospect $prospect): self
  173.     {
  174.         if ($this->prospects->removeElement($prospect)) {
  175.             // set the owning side to null (unless already changed)
  176.             if ($prospect->getRelatie() === $this) {
  177.                 $prospect->setRelatie(null);
  178.             }
  179.         }
  180.         return $this;
  181.     }
  182. }