src/Entity/EvaluationAnswer.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EvaluationAnswerRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassEvaluationAnswerRepository::class)]
  7. class EvaluationAnswer
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column]
  14.     private ?int $choice null;
  15.     #[ORM\ManyToOne(inversedBy'evaluationAnswers')]
  16.     #[ORM\JoinColumn(nullablefalse)]
  17.     private ?Evaluation $evaluation null;
  18.     #[ORM\ManyToOne(inversedBy'evaluationAnswers')]
  19.     #[ORM\JoinColumn(nullablefalse)]
  20.     private ?Question $question null;
  21.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  22.     private ?string $comment null;
  23.     public function __construct($question$evaluation$choice$comment)
  24.     {
  25.         $this->question $question;
  26.         $this->choice intval($choice);
  27.         $this->evaluation $evaluation;
  28.         $this->comment $comment;
  29.     }
  30.     public function getId(): ?int
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getChoice(): ?int
  35.     {
  36.         return $this->choice;
  37.     }
  38.     public function setChoice(int $choice): self
  39.     {
  40.         $this->choice $choice;
  41.         return $this;
  42.     }
  43.     public function getEvaluation(): ?Evaluation
  44.     {
  45.         return $this->evaluation;
  46.     }
  47.     public function setEvaluation(?Evaluation $evaluation): self
  48.     {
  49.         $this->evaluation $evaluation;
  50.         return $this;
  51.     }
  52.     public function getQuestion(): ?Question
  53.     {
  54.         return $this->question;
  55.     }
  56.     public function setQuestion(?Question $question): self
  57.     {
  58.         $this->question $question;
  59.         return $this;
  60.     }
  61.     public function getComment(): ?string
  62.     {
  63.         return $this->comment;
  64.     }
  65.     public function setComment(?string $comment): self
  66.     {
  67.         $this->comment $comment;
  68.         return $this;
  69.     }
  70. }