src/Entity/CRM/SurveyResponse.php line 9

  1. <?php
  2. // src/Entity/SurveyResponse.php
  3. namespace App\Entity\CRM;
  4. use App\Repository\SurveyResponseRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassSurveyResponseRepository::class)]
  7. class SurveyResponse
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column(type'integer')]
  12.     private ?int $id null;
  13.     #[ORM\Column(type'datetime')]
  14.     private ?\DateTimeInterface $createdAt null;
  15.     #[ORM\ManyToOne(targetEntitySurvey::class, inversedBy'responses')]
  16.     #[ORM\JoinColumn(nullablefalse)]
  17.     private ?Survey $survey null;
  18.     #[ORM\ManyToOne(inversedBy'surveyResponses')]
  19.     #[ORM\JoinColumn(nullablefalse)]
  20.     private ?SurveyQuestion $surveyQuestion null;
  21.     #[ORM\Column]
  22.     private ?int $answer null;
  23.     #[ORM\ManyToOne(inversedBy'surveyResponses')]
  24.     private ?Order $orderInstance null;
  25.     #[ORM\ManyToOne(inversedBy'surveyResponses')]
  26.     private ?Consultant $madeBy null;
  27.     public function __construct()
  28.     {
  29.         $this->createdAt = new \DateTime();
  30.     }
  31.     public function getId(): ?int
  32.     {
  33.         return $this->id;
  34.     }
  35.     public function getCreatedAt(): ?\DateTimeInterface
  36.     {
  37.         return $this->createdAt;
  38.     }
  39.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  40.     {
  41.         $this->createdAt $createdAt;
  42.         return $this;
  43.     }
  44.     public function getSurvey(): ?Survey
  45.     {
  46.         return $this->survey;
  47.     }
  48.     public function setSurvey(?Survey $survey): self
  49.     {
  50.         $this->survey $survey;
  51.         return $this;
  52.     }
  53.     public function getSurveyQuestion(): ?SurveyQuestion
  54.     {
  55.         return $this->surveyQuestion;
  56.     }
  57.     public function setSurveyQuestion(?SurveyQuestion $surveyQuestion): static
  58.     {
  59.         $this->surveyQuestion $surveyQuestion;
  60.         return $this;
  61.     }
  62.     public function getAnswer(): ?int
  63.     {
  64.         return $this->answer;
  65.     }
  66.     public function setAnswer(int $answer): static
  67.     {
  68.         $this->answer $answer;
  69.         return $this;
  70.     }
  71.     public function getOrderInstance(): ?Order
  72.     {
  73.         return $this->orderInstance;
  74.     }
  75.     public function setOrderInstance(?Order $orderInstance): static
  76.     {
  77.         $this->orderInstance $orderInstance;
  78.         return $this;
  79.     }
  80.     public function getMadeBy(): ?Consultant
  81.     {
  82.         return $this->madeBy;
  83.     }
  84.     public function setMadeBy(?Consultant $madeBy): static
  85.     {
  86.         $this->madeBy $madeBy;
  87.         return $this;
  88.     }
  89. }