src/Entity/SurveyContributionRankingAnswer.php line 12

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