*/ #[ORM\OneToMany(targetEntity: Answer::class, mappedBy: 'question', cascade: ['persist'], orphanRemoval: true)] private Collection $answers; public function __construct() { $this->answers = new ArrayCollection(); } public function getId(): ?Uuid { return $this->id; } public function getQuestion(): string { return $this->question; } public function setQuestion(string $question): static { $this->question = $question; return $this; } public function getQuiz(): Quiz { return $this->quiz; } public function setQuiz(Quiz $quiz): static { $this->quiz = $quiz; return $this; } public function isEnabled(): ?bool { return $this->enabled; } public function setEnabled(bool $enabled): static { $this->enabled = $enabled; return $this; } /** @return Collection */ public function getAnswers(): Collection { return $this->answers; } public function addAnswer(Answer $answer): static { if (!$this->answers->contains($answer)) { $this->answers->add($answer); $answer->setQuestion($this); } return $this; } }