src/Entity/Request/RequestForm.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Request;
  3. use App\Entity\Client\Client;
  4. use App\Entity\Client\SupportUser;
  5. use App\Entity\Configuration\Survey;
  6. use App\Entity\Languages;
  7. use App\Entity\Product\Product;
  8. use App\Entity\Project\Project;
  9. use App\Entity\Request\RequestComment;
  10. use App\Entity\User\User;
  11. use Doctrine\DBAL\Types\Types;
  12. use Doctrine\ORM\Mapping as ORM;
  13. use Doctrine\Common\Collections\Collection;
  14. use Doctrine\Common\Collections\ArrayCollection;
  15. use App\Repository\Request\RequestFormRepository;
  16. use Gedmo\Timestampable\Traits\TimestampableEntity;
  17. #[ORM\Entity(repositoryClassRequestFormRepository::class)]
  18. class RequestForm
  19. {
  20.     use TimestampableEntity;
  21.     #[ORM\Id]
  22.     #[ORM\GeneratedValue]
  23.     #[ORM\Column]
  24.     private ?int $id null;
  25.     #[ORM\Column(length255nullabletrue)]
  26.     private ?string $name null;
  27.     #[ORM\Column(length255nullabletrue)]
  28.     private ?string $company null;
  29.     #[ORM\Column(length255nullabletrue)]
  30.     private ?string $telephone null;
  31.     #[ORM\Column(nullabletrue)]
  32.     private ?bool $isOtherValue null;
  33.     #[ORM\ManyToOne]
  34.     private ?Languages $language null;
  35.     #[ORM\Column(length255nullabletrue)]
  36.     private ?string $email null;
  37.     #[ORM\OneToMany(mappedBy'requestForm'targetEntityRequestDetails::class, orphanRemovaltrue)]
  38.     private Collection $requestDetails;
  39.     #[ORM\ManyToOne(inversedBy'requestForms')]
  40.     #[ORM\JoinColumn(nullablefalse)]
  41.     private ?RequestStatus $requestStatus null;
  42.     #[ORM\OneToMany(mappedBy'requestForm'targetEntityRequestHistory::class, orphanRemovaltrue)]
  43.     private Collection $requestHistories;
  44.     #[ORM\Column(length255nullabletrue)]
  45.     private ?string $reference null;
  46.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  47.     private ?string $descriptionForm null;
  48.     #[ORM\ManyToOne(inversedBy'requestForms')]
  49.     #[ORM\JoinColumn(nullablefalse)]
  50.     private ?Survey $survey null;
  51.     #[ORM\Column(length255nullabletrue)]
  52.     private ?string $requestNum null;
  53.     #[ORM\ManyToOne(inversedBy'requestForms')]
  54.     private ?SupportUser $supportUser null;
  55.     #[ORM\OneToMany(mappedBy'requestForm'targetEntityRequestComment::class)]
  56.     private Collection $requestComments;
  57.     #[ORM\ManyToOne(inversedBy'requestForms')]
  58.     private ?Origin $origin null;
  59.     #[ORM\ManyToOne(inversedBy'requestForms')]
  60.     private ?RequestType $requestType null;
  61.     #[ORM\ManyToOne(inversedBy'requestForms')]
  62.     private ?Priority $priority null;
  63.     #[ORM\ManyToOne(inversedBy'requestForms')]
  64.     private ?Client $client null;
  65.     #[ORM\ManyToOne(inversedBy'requestForms')]
  66.     private ?Product $product null;
  67.     #[ORM\ManyToOne(inversedBy'requestForms')]
  68.     private ?Project $project null;
  69.     #[ORM\ManyToOne(inversedBy'requestForms')]
  70.     private ?User $user null;
  71.     public function __construct()
  72.     {
  73.         $this->requestDetails = new ArrayCollection();
  74.         $this->requestHistories = new ArrayCollection();
  75.         $this->createdAt = new \DateTime();
  76.         $this->updatedAt = new \DateTime();
  77.         $this->requestComments = new ArrayCollection();
  78.     }
  79.     public function getId(): ?int
  80.     {
  81.         return $this->id;
  82.     }
  83.     public function getName(): ?string
  84.     {
  85.         return $this->name;
  86.     }
  87.     public function setName(?string $name): self
  88.     {
  89.         $this->name $name;
  90.         return $this;
  91.     }
  92.     public function getCompany(): ?string
  93.     {
  94.         return $this->company;
  95.     }
  96.     public function setCompany(?string $company): self
  97.     {
  98.         $this->company $company;
  99.         return $this;
  100.     }
  101.     public function getTelephone(): ?string
  102.     {
  103.         return $this->telephone;
  104.     }
  105.     public function setTelephone(?string $telephone): self
  106.     {
  107.         $this->telephone $telephone;
  108.         return $this;
  109.     }
  110.     public function isIsOtherValue(): ?bool
  111.     {
  112.         return $this->isOtherValue;
  113.     }
  114.     public function setIsOtherValue(?bool $isOtherValue): self
  115.     {
  116.         $this->isOtherValue $isOtherValue;
  117.         return $this;
  118.     }
  119.     public function getLanguage(): ?Languages
  120.     {
  121.         return $this->language;
  122.     }
  123.     public function setLanguage(?Languages $language): self
  124.     {
  125.         $this->language $language;
  126.         return $this;
  127.     }
  128.      
  129.     public function getEmail(): ?string
  130.     {
  131.         return $this->email;
  132.     }
  133.     public function setEmail(?string $email): self
  134.     {
  135.         $this->email $email;
  136.         return $this;
  137.     }
  138.     /**
  139.      * @return Collection<int, RequestDetails>
  140.      */
  141.     public function getRequestDetails(): Collection
  142.     {
  143.         return $this->requestDetails;
  144.     }
  145.     public function addRequestDetail(RequestDetails $requestDetail): self
  146.     {
  147.         if (!$this->requestDetails->contains($requestDetail)) {
  148.             $this->requestDetails->add($requestDetail);
  149.             $requestDetail->setRequestForm($this);
  150.         }
  151.         return $this;
  152.     }
  153.     public function removeRequestDetail(RequestDetails $requestDetail): self
  154.     {
  155.         if ($this->requestDetails->removeElement($requestDetail)) {
  156.             // set the owning side to null (unless already changed)
  157.             if ($requestDetail->getRequestForm() === $this) {
  158.                 $requestDetail->setRequestForm(null);
  159.             }
  160.         }
  161.         return $this;
  162.     }
  163.     public function getRequestStatus(): ?RequestStatus
  164.     {
  165.         return $this->requestStatus;
  166.     }
  167.     public function setRequestStatus(?RequestStatus $requestStatus): self
  168.     {
  169.         $this->requestStatus $requestStatus;
  170.         return $this;
  171.     }
  172.     /**
  173.      * @return Collection<int, RequestHistory>
  174.      */
  175.     public function getRequestHistories(): Collection
  176.     {
  177.         return $this->requestHistories;
  178.     }
  179.     public function addRequestHistory(RequestHistory $requestHistory): self
  180.     {
  181.         if (!$this->requestHistories->contains($requestHistory)) {
  182.             $this->requestHistories->add($requestHistory);
  183.             $requestHistory->setRequestForm($this);
  184.         }
  185.         return $this;
  186.     }
  187.     public function removeRequestHistory(RequestHistory $requestHistory): self
  188.     {
  189.         if ($this->requestHistories->removeElement($requestHistory)) {
  190.             // set the owning side to null (unless already changed)
  191.             if ($requestHistory->getRequestForm() === $this) {
  192.                 $requestHistory->setRequestForm(null);
  193.             }
  194.         }
  195.         return $this;
  196.     }
  197.     public function getReference(): ?string
  198.     {
  199.         return $this->reference;
  200.     }
  201.     public function setReference(?string $reference): self
  202.     {
  203.         $this->reference $reference;
  204.         return $this;
  205.     }
  206.     public function getDescriptionForm(): ?string
  207.     {
  208.         return $this->descriptionForm;
  209.     }
  210.     public function setDescriptionForm(?string $descriptionForm): self
  211.     {
  212.         $this->descriptionForm $descriptionForm;
  213.         return $this;
  214.     }
  215.     public function getSurvey(): ?Survey
  216.     {
  217.         return $this->survey;
  218.     }
  219.     public function setSurvey(?Survey $survey): self
  220.     {
  221.         $this->survey $survey;
  222.         return $this;
  223.     }
  224.     public function getRequestNum(): ?string
  225.     {
  226.         return $this->requestNum;
  227.     }
  228.     public function setRequestNum(?string $requestNum): self
  229.     {
  230.         $this->requestNum $requestNum;
  231.         return $this;
  232.     }
  233.     public function getSupportUser(): ?SupportUser
  234.     {
  235.         return $this->supportUser;
  236.     }
  237.     public function setSupportUser(?SupportUser $supportUser): static
  238.     {
  239.         $this->supportUser $supportUser;
  240.         return $this;
  241.     }
  242.     /**
  243.      * @return Collection<int, RequestComment>
  244.      */
  245.     public function getRequestComments(): Collection
  246.     {
  247.         return $this->requestComments;
  248.     }
  249.     public function addRequestComment(RequestComment $requestComment): static
  250.     {
  251.         if (!$this->requestComments->contains($requestComment)) {
  252.             $this->requestComments->add($requestComment);
  253.             $requestComment->setRequestForm($this);
  254.         }
  255.         return $this;
  256.     }
  257.     public function removeRequestComment(RequestComment $requestComment): static
  258.     {
  259.         if ($this->requestComments->removeElement($requestComment)) {
  260.             // set the owning side to null (unless already changed)
  261.             if ($requestComment->getRequestForm() === $this) {
  262.                 $requestComment->setRequestForm(null);
  263.             }
  264.         }
  265.         return $this;
  266.     }
  267.     public function getOrigin(): ?Origin
  268.     {
  269.         return $this->origin;
  270.     }
  271.     public function setOrigin(?Origin $origin): static
  272.     {
  273.         $this->origin $origin;
  274.         return $this;
  275.     }
  276.     public function getRequestType(): ?RequestType
  277.     {
  278.         return $this->requestType;
  279.     }
  280.     public function setRequestType(?RequestType $requestType): static
  281.     {
  282.         $this->requestType $requestType;
  283.         return $this;
  284.     }
  285.     public function getPriority(): ?Priority
  286.     {
  287.         return $this->priority;
  288.     }
  289.     public function setPriority(?Priority $priority): static
  290.     {
  291.         $this->priority $priority;
  292.         return $this;
  293.     }
  294.     public function getClient(): ?Client
  295.     {
  296.         return $this->client;
  297.     }
  298.     public function setClient(?Client $client): static
  299.     {
  300.         $this->client $client;
  301.         return $this;
  302.     }
  303.     public function getProduct(): ?Product
  304.     {
  305.         return $this->product;
  306.     }
  307.     public function setProduct(?Product $product): static
  308.     {
  309.         $this->product $product;
  310.         return $this;
  311.     }
  312.     public function getProject(): ?Project
  313.     {
  314.         return $this->project;
  315.     }
  316.     public function setProject(?Project $project): static
  317.     {
  318.         $this->project $project;
  319.         return $this;
  320.     }
  321.     public function getUser(): ?User
  322.     {
  323.         return $this->user;
  324.     }
  325.     public function setUser(?User $user): static
  326.     {
  327.         $this->user $user;
  328.         return $this;
  329.     }
  330.  
  331.  
  332. }