src/Entity/CustomerInformation.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CustomerInformationRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassCustomerInformationRepository::class)]
  8. class CustomerInformation
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255)]
  15.     private ?string $company null;
  16.     #[ORM\Column(length255)]
  17.     private ?string $name null;
  18.     #[ORM\Column(length255)]
  19.     private ?string $email null;
  20.     #[ORM\OneToMany(mappedBy'customer_information'targetEntitySupport::class)]
  21.     private Collection $supports;
  22.     #[ORM\OneToMany(mappedBy'customer_information'targetEntityEvolution::class)]
  23.     private Collection $evolutions;
  24.     public function __construct()
  25.     {
  26.         $this->supports = new ArrayCollection();
  27.         $this->evolutions = new ArrayCollection();
  28.     }
  29.     public function getId(): ?int
  30.     {
  31.         return $this->id;
  32.     }
  33.     public function getCompany(): ?string
  34.     {
  35.         return $this->company;
  36.     }
  37.     public function setCompany(string $company): self
  38.     {
  39.         $this->company $company;
  40.         return $this;
  41.     }
  42.     public function getEmail(): ?string
  43.     {
  44.         return $this->email;
  45.     }
  46.     public function setEmail(?string $email): self
  47.     {
  48.         $this->email $email;
  49.         return $this;
  50.     }
  51.     /**
  52.      * @return Collection<int, Support>
  53.      */
  54.     public function getSupports(): Collection
  55.     {
  56.         return $this->supports;
  57.     }
  58.     public function addSupport(Support $support): self
  59.     {
  60.         if (!$this->supports->contains($support)) {
  61.             $this->supports->add($support);
  62.             $support->setCustomerInformation($this);
  63.         }
  64.         return $this;
  65.     }
  66.     public function removeSupport(Support $support): self
  67.     {
  68.         if ($this->supports->removeElement($support)) {
  69.             // set the owning side to null (unless already changed)
  70.             if ($support->getCustomerInformation() === $this) {
  71.                 $support->setCustomerInformation(null);
  72.             }
  73.         }
  74.         return $this;
  75.     }
  76.     public function getName(): ?string
  77.     {
  78.         return $this->name;
  79.     }
  80.     public function setName(?string $name): self
  81.     {
  82.         $this->name $name;
  83.         return $this;
  84.     }
  85.     /**
  86.      * @return Collection<int, Evolution>
  87.      */
  88.     public function getEvolutions(): Collection
  89.     {
  90.         return $this->evolutions;
  91.     }
  92.     public function addEvolution(Evolution $evolution): self
  93.     {
  94.         if (!$this->evolutions->contains($evolution)) {
  95.             $this->evolutions->add($evolution);
  96.             $evolution->setCustomerInformation($this);
  97.         }
  98.         return $this;
  99.     }
  100.     public function removeEvolution(Evolution $evolution): self
  101.     {
  102.         if ($this->evolutions->removeElement($evolution)) {
  103.             // set the owning side to null (unless already changed)
  104.             if ($evolution->getCustomerInformation() === $this) {
  105.                 $evolution->setCustomerInformation(null);
  106.             }
  107.         }
  108.         return $this;
  109.     }
  110. }