<?phpnamespace App\Entity;use App\Repository\QuizQuestionRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: QuizQuestionRepository::class)]class QuizQuestion{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 100000)] private ?string $label = null; #[ORM\Column(length: 255)] private ?string $type = null; #[ORM\OneToMany(mappedBy: 'question', targetEntity: QuizReponse::class, cascade: ['persist', 'remove'])] private Collection $quizReponses; #[ORM\ManyToOne(inversedBy: 'quizQuestions')] private ?Quiz $quiz = null; #[ORM\OneToMany(mappedBy: 'quizQuestion', targetEntity: QuestionOptions::class, cascade: ['persist', 'remove'])] private Collection $options; #[ORM\Column(length: 255)] private ?string $IdFileds = null; public function __construct() { $this->quizReponses = new ArrayCollection(); $this->options = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getLabel(): ?string { return $this->label; } public function setLabel(string $label): self { $this->label = $label; return $this; } public function getType(): ?string { return $this->type; } public function setType(string $type): self { $this->type = $type; return $this; } /** * @return Collection<int, QuizReponse> */ public function getQuizReponses(): Collection { return $this->quizReponses; } public function addQuizReponse(QuizReponse $quizReponse): self { if (!$this->quizReponses->contains($quizReponse)) { $this->quizReponses->add($quizReponse); $quizReponse->setQuestion($this); } return $this; } public function removeQuizReponse(QuizReponse $quizReponse): self { if ($this->quizReponses->removeElement($quizReponse)) { // set the owning side to null (unless already changed) if ($quizReponse->getQuestion() === $this) { $quizReponse->setQuestion(null); } } return $this; } public function getQuiz(): ?Quiz { return $this->quiz; } public function setQuiz(?Quiz $quiz): self { $this->quiz = $quiz; return $this; } /** * @return Collection<int, QuestionOptions> */ public function getOptions(): Collection { return $this->options; } public function addOption(QuestionOptions $option): self { if (!$this->options->contains($option)) { $this->options->add($option); $option->setQuizQuestion($this); } return $this; } public function removeOption(QuestionOptions $option): self { if ($this->options->removeElement($option)) { // set the owning side to null (unless already changed) if ($option->getQuizQuestion() === $this) { $option->setQuizQuestion(null); } } return $this; } public function getIdFileds(): ?string { return $this->IdFileds; } public function setIdFileds(string $IdFileds): self { $this->IdFileds = $IdFileds; return $this; }}