src/Entity/QuestionOption.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\QuestionOptionRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassQuestionOptionRepository::class)]
  6. class QuestionOption
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column]
  11.     private ?int $id null;
  12.     #[ORM\Column(length255)]
  13.     private ?string $value null;
  14.     #[ORM\Column]
  15.     private ?int $position null;
  16.     #[ORM\ManyToOne(inversedBy'options')]
  17.     #[ORM\JoinColumn(nullablefalse)]
  18.     private ?Question $question null;
  19.     public function getId(): ?int
  20.     {
  21.         return $this->id;
  22.     }
  23.     public function getValue(): ?string
  24.     {
  25.         return $this->value;
  26.     }
  27.     public function setValue(string $value): self
  28.     {
  29.         $this->value $value;
  30.         return $this;
  31.     }
  32.     public function getPosition(): ?int
  33.     {
  34.         return $this->position;
  35.     }
  36.     public function setPosition(int $position): self
  37.     {
  38.         $this->position $position;
  39.         return $this;
  40.     }
  41.     public function getQuestion(): ?Question
  42.     {
  43.         return $this->question;
  44.     }
  45.     public function setQuestion(?Question $question): self
  46.     {
  47.         $this->question $question;
  48.         return $this;
  49.     }
  50. }