src/Entity/SurveyContributionMultiLineOpenEndedAnswer.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SurveyContributionMultiLineOpenEndedAnswerRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. /**
  7.  * @ORM\Entity(repositoryClass=SurveyContributionMultiLineOpenEndedAnswerRepository::class)
  8.  */
  9. class SurveyContributionMultiLineOpenEndedAnswer
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @var SurveyContributionQuestion
  19.      *
  20.      * @ORM\ManyToOne(targetEntity="App\Entity\SurveyContributionQuestion", inversedBy="contributionMultiLineOpenEndedAnswers")
  21.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  22.      */
  23.     private $contributionQuestion;
  24.     /**
  25.      * @var SurveyFormAnswer
  26.      *
  27.      * @ORM\ManyToOne(targetEntity="App\Entity\SurveyFormAnswer")
  28.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  29.      * @Groups({"surveyContribution:read"})
  30.      */
  31.     private $formAnswer;
  32.     /**
  33.      * @ORM\Column(type="text", nullable=true)
  34.      * @Groups({"surveyContribution:read"})
  35.      */
  36.     private $answerText;
  37.     /**
  38.      * @ORM\Column(type="integer", nullable=true)
  39.      */
  40.     private $position;
  41.     public function getId(): ?int
  42.     {
  43.         return $this->id;
  44.     }
  45.     public function getContributionQuestion(): ?SurveyContributionQuestion
  46.     {
  47.         return $this->contributionQuestion;
  48.     }
  49.     public function setContributionQuestion(?SurveyContributionQuestion $contributionQuestion): self
  50.     {
  51.         $this->contributionQuestion $contributionQuestion;
  52.         return $this;
  53.     }
  54.     public function getFormAnswer(): ?SurveyFormAnswer
  55.     {
  56.         return $this->formAnswer;
  57.     }
  58.     public function setFormAnswer(?SurveyFormAnswer $formAnswer): self
  59.     {
  60.         $this->formAnswer $formAnswer;
  61.         return $this;
  62.     }
  63.     public function getAnswerText(): ?string
  64.     {
  65.         return $this->answerText;
  66.     }
  67.     public function setAnswerText(string $answerText): self
  68.     {
  69.         $this->answerText $answerText;
  70.         return $this;
  71.     }
  72.     public function getPosition(): ?int
  73.     {
  74.         return $this->position;
  75.     }
  76.     public function setPosition(?int $position): self
  77.     {
  78.         $this->position $position;
  79.         return $this;
  80.     }
  81. }