src/Entity/Client/SupportUser.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Client;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use App\Entity\Request\RequestForm;
  6. use Doctrine\Common\Collections\Collection;
  7. use App\Repository\Client\SupportUserRepository;
  8. use Doctrine\Common\Collections\ArrayCollection;
  9. use Gedmo\Timestampable\Traits\TimestampableEntity;
  10. #[ORM\Entity(repositoryClassSupportUserRepository::class)]
  11. class SupportUser
  12. {
  13.     use TimestampableEntity;
  14.     #[ORM\Id]
  15.     #[ORM\GeneratedValue]
  16.     #[ORM\Column]
  17.     private ?int $id null;
  18.     #[ORM\Column(length255nullabletrue)]
  19.     private ?string $email null;
  20.     #[ORM\Column(length255nullabletrue)]
  21.     private ?string $name null;
  22.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  23.     private ?string $token null;
  24.     #[ORM\ManyToOne(inversedBy'supportUsers')]
  25.     private ?Client $client null;
  26.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  27.     private ?\DateTimeInterface $deletedAt null;
  28.     #[ORM\OneToMany(mappedBy'supportUser'targetEntityRequestForm::class)]
  29.     private Collection $requestForms;
  30.     #[ORM\Column(nullabletrue)]
  31.     private ?bool $isEnable null;
  32.     public function __construct()
  33.     {
  34.         $this->requestForms = new ArrayCollection();
  35.     }
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getEmail(): ?string
  41.     {
  42.         return $this->email;
  43.     }
  44.     public function setEmail(?string $email): static
  45.     {
  46.         $this->email $email;
  47.         return $this;
  48.     }
  49.     public function getName(): ?string
  50.     {
  51.         return $this->name;
  52.     }
  53.     public function setName(?string $name): static
  54.     {
  55.         $this->name $name;
  56.         return $this;
  57.     }
  58.     public function getToken(): ?string
  59.     {
  60.         return $this->token;
  61.     }
  62.     public function setToken(?string $token): static
  63.     {
  64.         $this->token $token;
  65.         return $this;
  66.     }
  67.     public function getClient(): ?Client
  68.     {
  69.         return $this->client;
  70.     }
  71.     public function setClient(?Client $client): static
  72.     {
  73.         $this->client $client;
  74.         return $this;
  75.     }
  76.     public function getDeletedAt(): ?\DateTimeInterface
  77.     {
  78.         return $this->deletedAt;
  79.     }
  80.     public function setDeletedAt(?\DateTimeInterface $deletedAt): static
  81.     {
  82.         $this->deletedAt $deletedAt;
  83.         return $this;
  84.     }
  85.     /**
  86.      * @return Collection<int, RequestForm>
  87.      */
  88.     public function getRequestForms(): Collection
  89.     {
  90.         return $this->requestForms;
  91.     }
  92.     public function addRequestForm(RequestForm $requestForm): static
  93.     {
  94.         if (!$this->requestForms->contains($requestForm)) {
  95.             $this->requestForms->add($requestForm);
  96.             $requestForm->setSupportUser($this);
  97.         }
  98.         return $this;
  99.     }
  100.     public function removeRequestForm(RequestForm $requestForm): static
  101.     {
  102.         if ($this->requestForms->removeElement($requestForm)) {
  103.             // set the owning side to null (unless already changed)
  104.             if ($requestForm->getSupportUser() === $this) {
  105.                 $requestForm->setSupportUser(null);
  106.             }
  107.         }
  108.         return $this;
  109.     }
  110.     public function isIsEnable(): ?bool
  111.     {
  112.         return $this->isEnable;
  113.     }
  114.     public function setIsEnable(?bool $isEnable): static
  115.     {
  116.         $this->isEnable $isEnable;
  117.         return $this;
  118.     }
  119. }