src/Entity/Request/RequestForm.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Request;
  3. use App\Entity\Client\SupportUser;
  4. use App\Entity\Configuration\Survey;
  5. use App\Entity\Languages;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Doctrine\Common\Collections\Collection;
  9. use Doctrine\Common\Collections\ArrayCollection;
  10. use App\Repository\Request\RequestFormRepository;
  11. use Gedmo\Timestampable\Traits\TimestampableEntity;
  12. #[ORM\Entity(repositoryClassRequestFormRepository::class)]
  13. class RequestForm
  14. {
  15.     use TimestampableEntity;
  16.     #[ORM\Id]
  17.     #[ORM\GeneratedValue]
  18.     #[ORM\Column]
  19.     private ?int $id null;
  20.     #[ORM\Column(length255nullabletrue)]
  21.     private ?string $name null;
  22.     #[ORM\Column(length255nullabletrue)]
  23.     private ?string $company null;
  24.     #[ORM\Column(length255nullabletrue)]
  25.     private ?string $telephone null;
  26.     #[ORM\Column(nullabletrue)]
  27.     private ?bool $isOtherValue null;
  28.     #[ORM\ManyToOne]
  29.     private ?Languages $language null;
  30.     #[ORM\Column(length255nullabletrue)]
  31.     private ?string $email null;
  32.     #[ORM\OneToMany(mappedBy'requestForm'targetEntityRequestDetails::class, orphanRemovaltrue)]
  33.     private Collection $requestDetails;
  34.     #[ORM\ManyToOne(inversedBy'requestForms')]
  35.     #[ORM\JoinColumn(nullablefalse)]
  36.     private ?RequestStatus $requestStatus null;
  37.     #[ORM\OneToMany(mappedBy'requestForm'targetEntityRequestHistory::class, orphanRemovaltrue)]
  38.     private Collection $requestHistories;
  39.     #[ORM\Column(length255nullabletrue)]
  40.     private ?string $reference null;
  41.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  42.     private ?string $descriptionForm null;
  43.     #[ORM\ManyToOne(inversedBy'requestForms')]
  44.     #[ORM\JoinColumn(nullablefalse)]
  45.     private ?Survey $survey null;
  46.     #[ORM\Column(length255nullabletrue)]
  47.     private ?string $requestNum null;
  48.     #[ORM\ManyToOne(inversedBy'requestForms')]
  49.     private ?SupportUser $supportUser null;
  50.     public function __construct()
  51.     {
  52.         $this->requestDetails = new ArrayCollection();
  53.         $this->requestHistories = new ArrayCollection();
  54.         $this->createdAt = new \DateTime();
  55.         $this->updatedAt = new \DateTime();
  56.     }
  57.     public function getId(): ?int
  58.     {
  59.         return $this->id;
  60.     }
  61.     public function getName(): ?string
  62.     {
  63.         return $this->name;
  64.     }
  65.     public function setName(?string $name): self
  66.     {
  67.         $this->name $name;
  68.         return $this;
  69.     }
  70.     public function getCompany(): ?string
  71.     {
  72.         return $this->company;
  73.     }
  74.     public function setCompany(?string $company): self
  75.     {
  76.         $this->company $company;
  77.         return $this;
  78.     }
  79.     public function getTelephone(): ?string
  80.     {
  81.         return $this->telephone;
  82.     }
  83.     public function setTelephone(?string $telephone): self
  84.     {
  85.         $this->telephone $telephone;
  86.         return $this;
  87.     }
  88.     public function isIsOtherValue(): ?bool
  89.     {
  90.         return $this->isOtherValue;
  91.     }
  92.     public function setIsOtherValue(?bool $isOtherValue): self
  93.     {
  94.         $this->isOtherValue $isOtherValue;
  95.         return $this;
  96.     }
  97.     public function getLanguage(): ?Languages
  98.     {
  99.         return $this->language;
  100.     }
  101.     public function setLanguage(?Languages $language): self
  102.     {
  103.         $this->language $language;
  104.         return $this;
  105.     }
  106.      
  107.     public function getEmail(): ?string
  108.     {
  109.         return $this->email;
  110.     }
  111.     public function setEmail(?string $email): self
  112.     {
  113.         $this->email $email;
  114.         return $this;
  115.     }
  116.     /**
  117.      * @return Collection<int, RequestDetails>
  118.      */
  119.     public function getRequestDetails(): Collection
  120.     {
  121.         return $this->requestDetails;
  122.     }
  123.     public function addRequestDetail(RequestDetails $requestDetail): self
  124.     {
  125.         if (!$this->requestDetails->contains($requestDetail)) {
  126.             $this->requestDetails->add($requestDetail);
  127.             $requestDetail->setRequestForm($this);
  128.         }
  129.         return $this;
  130.     }
  131.     public function removeRequestDetail(RequestDetails $requestDetail): self
  132.     {
  133.         if ($this->requestDetails->removeElement($requestDetail)) {
  134.             // set the owning side to null (unless already changed)
  135.             if ($requestDetail->getRequestForm() === $this) {
  136.                 $requestDetail->setRequestForm(null);
  137.             }
  138.         }
  139.         return $this;
  140.     }
  141.     public function getRequestStatus(): ?RequestStatus
  142.     {
  143.         return $this->requestStatus;
  144.     }
  145.     public function setRequestStatus(?RequestStatus $requestStatus): self
  146.     {
  147.         $this->requestStatus $requestStatus;
  148.         return $this;
  149.     }
  150.     /**
  151.      * @return Collection<int, RequestHistory>
  152.      */
  153.     public function getRequestHistories(): Collection
  154.     {
  155.         return $this->requestHistories;
  156.     }
  157.     public function addRequestHistory(RequestHistory $requestHistory): self
  158.     {
  159.         if (!$this->requestHistories->contains($requestHistory)) {
  160.             $this->requestHistories->add($requestHistory);
  161.             $requestHistory->setRequestForm($this);
  162.         }
  163.         return $this;
  164.     }
  165.     public function removeRequestHistory(RequestHistory $requestHistory): self
  166.     {
  167.         if ($this->requestHistories->removeElement($requestHistory)) {
  168.             // set the owning side to null (unless already changed)
  169.             if ($requestHistory->getRequestForm() === $this) {
  170.                 $requestHistory->setRequestForm(null);
  171.             }
  172.         }
  173.         return $this;
  174.     }
  175.     public function getReference(): ?string
  176.     {
  177.         return $this->reference;
  178.     }
  179.     public function setReference(?string $reference): self
  180.     {
  181.         $this->reference $reference;
  182.         return $this;
  183.     }
  184.     public function getDescriptionForm(): ?string
  185.     {
  186.         return $this->descriptionForm;
  187.     }
  188.     public function setDescriptionForm(?string $descriptionForm): self
  189.     {
  190.         $this->descriptionForm $descriptionForm;
  191.         return $this;
  192.     }
  193.     public function getSurvey(): ?Survey
  194.     {
  195.         return $this->survey;
  196.     }
  197.     public function setSurvey(?Survey $survey): self
  198.     {
  199.         $this->survey $survey;
  200.         return $this;
  201.     }
  202.     public function getRequestNum(): ?string
  203.     {
  204.         return $this->requestNum;
  205.     }
  206.     public function setRequestNum(?string $requestNum): self
  207.     {
  208.         $this->requestNum $requestNum;
  209.         return $this;
  210.     }
  211.     public function getSupportUser(): ?SupportUser
  212.     {
  213.         return $this->supportUser;
  214.     }
  215.     public function setSupportUser(?SupportUser $supportUser): static
  216.     {
  217.         $this->supportUser $supportUser;
  218.         return $this;
  219.     }
  220.  
  221.  
  222. }