src/Entity/Client.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ClientRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassClientRepository::class)]
  9. class Client
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $name null;
  17.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  18.     private ?\DateTimeInterface $createdAt null;
  19.     #[ORM\Column(length255nullabletrue)]
  20.     private ?string $address null;
  21.     #[ORM\OneToMany(targetEntityEmployee::class, mappedBy'client')]
  22.     private Collection $employees;
  23.     #[ORM\Column]
  24.     private ?bool $deleted null;
  25.     #[ORM\Column(length255nullabletrue)]
  26.     private ?string $emailAddress null;
  27.     #[ORM\Column(length255nullabletrue)]
  28.     private ?string $tva null;
  29.     #[ORM\Column(length255nullabletrue)]
  30.     private ?string $phone null;
  31.     #[ORM\OneToMany(targetEntityReviewForm::class, mappedBy'clientId')]
  32.     private Collection $review_form_id;
  33.     public function __construct()
  34.     {
  35.         $this->employees = new ArrayCollection();
  36.         $this->review_form_id = new ArrayCollection();
  37.     }
  38.     public function getId(): ?int
  39.     {
  40.         return $this->id;
  41.     }
  42.     public function getName(): ?string
  43.     {
  44.         return $this->name;
  45.     }
  46.     public function setName(string $name): static
  47.     {
  48.         $this->name $name;
  49.         return $this;
  50.     }
  51.     public function getCreatedAt(): ?\DateTimeInterface
  52.     {
  53.         return $this->createdAt;
  54.     }
  55.     public function setCreatedAt(\DateTimeInterface $createdAt): static
  56.     {
  57.         $this->createdAt $createdAt;
  58.         return $this;
  59.     }
  60.     public function getAddress(): ?string
  61.     {
  62.         return $this->address;
  63.     }
  64.     public function setAddress(?string $address): static
  65.     {
  66.         $this->address $address;
  67.         return $this;
  68.     }
  69.     /**
  70.      * @return Collection<int, Employee>
  71.      */
  72.     public function getEmployees(): Collection
  73.     {
  74.         return $this->employees;
  75.     }
  76.     public function addEmployee(Employee $employee): static
  77.     {
  78.         if (!$this->employees->contains($employee)) {
  79.             $this->employees->add($employee);
  80.             $employee->setClient($this);
  81.         }
  82.         return $this;
  83.     }
  84.     public function removeEmployee(Employee $employee): static
  85.     {
  86.         if ($this->employees->removeElement($employee)) {
  87.             // set the owning side to null (unless already changed)
  88.             if ($employee->getClient() === $this) {
  89.                 $employee->setClient(null);
  90.             }
  91.         }
  92.         return $this;
  93.     }
  94.     public function isDeleted(): ?bool
  95.     {
  96.         return $this->deleted;
  97.     }
  98.     public function setDeleted(bool $deleted): static
  99.     {
  100.         $this->deleted $deleted;
  101.         return $this;
  102.     }
  103.     public function getEmailAddress(): ?string
  104.     {
  105.         return $this->emailAddress;
  106.     }
  107.     public function setEmailAddress(?string $emailAddress): static
  108.     {
  109.         $this->emailAddress $emailAddress;
  110.         return $this;
  111.     }
  112.     public function getTva(): ?string
  113.     {
  114.         return $this->tva;
  115.     }
  116.     public function setTva(?string $tva): static
  117.     {
  118.         $this->tva $tva;
  119.         return $this;
  120.     }
  121.     public function getPhone(): ?string
  122.     {
  123.         return $this->phone;
  124.     }
  125.     public function setPhone(?string $phone): static
  126.     {
  127.         $this->phone $phone;
  128.         return $this;
  129.     }
  130.     /**
  131.      * @return Collection<int, ReviewForm>
  132.      */
  133.     public function getReviewFormId(): Collection
  134.     {
  135.         return $this->review_form_id;
  136.     }
  137.     public function addReviewFormId(ReviewForm $reviewFormId): static
  138.     {
  139.         if (!$this->review_form_id->contains($reviewFormId)) {
  140.             $this->review_form_id->add($reviewFormId);
  141.             $reviewFormId->setClientId($this);
  142.         }
  143.         return $this;
  144.     }
  145.     public function removeReviewFormId(ReviewForm $reviewFormId): static
  146.     {
  147.         if ($this->review_form_id->removeElement($reviewFormId)) {
  148.             // set the owning side to null (unless already changed)
  149.             if ($reviewFormId->getClientId() === $this) {
  150.                 $reviewFormId->setClientId(null);
  151.             }
  152.         }
  153.         return $this;
  154.     }
  155. }