src/Entity/SurveyContributionMatrixAnswer.php line 12

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