src/Entity/QuestionnaireResult.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\QuestionnaireResultRepository;
  4. use DateTimeImmutable;
  5. use DateTimeInterface;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=QuestionnaireResultRepository::class)
  9.  * @ORM\Table(name="app_questionnaire_result")
  10.  */
  11. class QuestionnaireResult
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="string", length=255, nullable=true)
  21.      */
  22.     private ?string $result;
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity=Survey::class, inversedBy="questionnaireResults")
  25.      * @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
  26.      */
  27.     private ?Survey $survey;
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity=Question::class, inversedBy="questionnaireResults")
  30.      * @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
  31.      */
  32.     private ?Question $question;
  33.     /**
  34.      * @ORM\ManyToOne(targetEntity=Answer::class, inversedBy="questionnaireResults")
  35.      * @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
  36.      */
  37.     private ?Answer $answer;
  38.     /**
  39.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="questionnaireResults")
  40.      * @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
  41.      */
  42.     private ?User $user;
  43.     /**
  44.      * @ORM\Column(type="datetime_immutable", nullable=true, options={"default": "CURRENT_TIMESTAMP"})
  45.      */
  46.     private ?DateTimeInterface $createAt;
  47.     /**
  48.      * @ORM\Column(type="boolean", options={"default": false})
  49.      */
  50.     private bool $completed false;
  51.     public function getId(): ?int
  52.     {
  53.         return $this->id;
  54.     }
  55.     public function getResult(): ?string
  56.     {
  57.         return $this->result;
  58.     }
  59.     public function setResult(?string $result): self
  60.     {
  61.         $this->result $result;
  62.         return $this;
  63.     }
  64.     public function getUser(): ?User
  65.     {
  66.         return $this->user;
  67.     }
  68.     public function setUser(?User $user): self
  69.     {
  70.         $this->user $user;
  71.         return $this;
  72.     }
  73.     public function getAnswer(): ?Answer
  74.     {
  75.         return $this->answer;
  76.     }
  77.     public function setAnswer(?Answer $answer): self
  78.     {
  79.         $this->answer $answer;
  80.         return $this;
  81.     }
  82.     public function getQuestion(): ?Question
  83.     {
  84.         return $this->question;
  85.     }
  86.     public function setQuestion(?Question $question): self
  87.     {
  88.         $this->question $question;
  89.         return $this;
  90.     }
  91.     public function getSurvey(): ?Survey
  92.     {
  93.         return $this->survey;
  94.     }
  95.     public function setSurvey(?Survey $survey): self
  96.     {
  97.         $this->survey $survey;
  98.         return $this;
  99.     }
  100.     public function getCreateAt(): ?DateTimeInterface
  101.     {
  102.         return $this->createAt;
  103.     }
  104.     public function setCreateAt(?DateTimeImmutable $createAt): self
  105.     {
  106.         $this->createAt $createAt;
  107.         return $this;
  108.     }
  109.     public function isCompleted(): bool
  110.     {
  111.         return $this->completed;
  112.     }
  113.     public function setCompleted(bool $completed): self
  114.     {
  115.         $this->completed $completed;
  116.         return $this;
  117.     }
  118. }