src/Entity/Agent.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AgentRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassAgentRepository::class)]
  8. class Agent
  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'agent'targetEntityOrder::class)]
  33.     private Collection $orders;
  34.     #[ORM\ManyToOne(inversedBy'agents')]
  35.     #[ORM\JoinColumn(nullablefalse)]
  36.     private ?uitvaartvereniging $uitvaartvereniging null;
  37.     
  38.     public function __construct()
  39.     {
  40.         $this->orders = new ArrayCollection();
  41.         
  42.     }
  43.     public function __toString()
  44.     {
  45.         return($this->naam.', '.$this->wwoonplaats);
  46.     }
  47.     
  48.     
  49.     public function getId(): ?int
  50.     {
  51.         return $this->id;
  52.     }
  53.     public function getNaam(): ?string
  54.     {
  55.         return $this->naam;
  56.     }
  57.     public function setNaam(string $naam): self
  58.     {
  59.         $this->naam $naam;
  60.         return $this;
  61.     }
  62.     public function getWadres(): ?string
  63.     {
  64.         return $this->wadres;
  65.     }
  66.     public function setWadres(?string $wadres): self
  67.     {
  68.         $this->wadres $wadres;
  69.         return $this;
  70.     }
  71.     public function getWpostcode(): ?string
  72.     {
  73.         return $this->wpostcode;
  74.     }
  75.     public function setWpostcode(?string $wpostcode): self
  76.     {
  77.         $this->wpostcode $wpostcode;
  78.         return $this;
  79.     }
  80.     public function getWwoonplaats(): ?string
  81.     {
  82.         return $this->wwoonplaats;
  83.     }
  84.     public function setWwoonplaats(?string $wwoonplaats): self
  85.     {
  86.         $this->wwoonplaats $wwoonplaats;
  87.         return $this;
  88.     }
  89.     public function getTelefoon(): ?string
  90.     {
  91.         return $this->telefoon;
  92.     }
  93.     public function setTelefoon(?string $telefoon): self
  94.     {
  95.         $this->telefoon $telefoon;
  96.         return $this;
  97.     }
  98.     public function getEmail(): ?string
  99.     {
  100.         return $this->email;
  101.     }
  102.     public function setEmail(?string $email): self
  103.     {
  104.         $this->email $email;
  105.         return $this;
  106.     }
  107.     public function getPadres(): ?string
  108.     {
  109.         return $this->padres;
  110.     }
  111.     public function setPadres(?string $padres): self
  112.     {
  113.         $this->padres $padres;
  114.         return $this;
  115.     }
  116.     public function getPpostcode(): ?string
  117.     {
  118.         return $this->ppostcode;
  119.     }
  120.     public function setPpostcode(?string $ppostcode): self
  121.     {
  122.         $this->ppostcode $ppostcode;
  123.         return $this;
  124.     }
  125.     public function getPwoonplaats(): ?string
  126.     {
  127.         return $this->pwoonplaats;
  128.     }
  129.     public function setPwoonplaats(?string $pwoonplaats): self
  130.     {
  131.         $this->pwoonplaats $pwoonplaats;
  132.         return $this;
  133.     }
  134.     /**
  135.      * @return Collection<int, Order>
  136.      */
  137.     public function getOrders(): Collection
  138.     {
  139.         return $this->orders;
  140.     }
  141.     public function addOrder(Order $order): self
  142.     {
  143.         if (!$this->orders->contains($order)) {
  144.             $this->orders->add($order);
  145.             $order->setAgent($this);
  146.         }
  147.         return $this;
  148.     }
  149.     public function removeOrder(Order $order): self
  150.     {
  151.         if ($this->orders->removeElement($order)) {
  152.             // set the owning side to null (unless already changed)
  153.             if ($order->getAgent() === $this) {
  154.                 $order->setAgent(null);
  155.             }
  156.         }
  157.         return $this;
  158.     }
  159.     public function getUitvaartvereniging(): ?uitvaartvereniging
  160.     {
  161.         return $this->uitvaartvereniging;
  162.     }
  163.     public function setUitvaartvereniging(?uitvaartvereniging $uitvaartvereniging): self
  164.     {
  165.         $this->uitvaartvereniging $uitvaartvereniging;
  166.         return $this;
  167.     }
  168.  
  169. }