<?phpnamespace App\Entity;use App\Repository\QuestionRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: QuestionRepository::class)]class Question{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255)] private ?string $name = null; #[ORM\ManyToOne(inversedBy: 'questions')] private ?Dimension $dimension = null; #[ORM\Column] private ?bool $deleted = null; #[ORM\OneToMany(targetEntity: Reponse::class, mappedBy: 'question')] private Collection $reponses; #[ORM\Column] private ?bool $custom = null; #[ORM\Column(length: 255)] private ?string $lang = null; #[ORM\Column] private ?bool $hasMinimal = null; public function __construct() { $this->reponses = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): static { $this->name = $name; return $this; } public function getDimension(): ?Dimension { return $this->dimension; } public function setDimension(?Dimension $dimension): static { $this->dimension = $dimension; return $this; } public function isDeleted(): ?bool { return $this->deleted; } public function setDeleted(bool $deleted): static { $this->deleted = $deleted; return $this; } /** * @return Collection<int, Reponse> */ public function getReponses(): Collection { return $this->reponses; } public function addReponse(Reponse $reponse): static { if (!$this->reponses->contains($reponse)) { $this->reponses->add($reponse); $reponse->setQuestion($this); } return $this; } public function removeReponse(Reponse $reponse): static { if ($this->reponses->removeElement($reponse)) { // set the owning side to null (unless already changed) if ($reponse->getQuestion() === $this) { $reponse->setQuestion(null); } } return $this; } public function isCustom(): ?bool { return $this->custom; } public function setCustom(bool $custom): static { $this->custom = $custom; return $this; } public function getLang(): ?string { return $this->lang; } public function setLang(string $lang): static { $this->lang = $lang; return $this; } public function isHasMinimal(): ?bool { return $this->hasMinimal; } public function setHasMinimal(bool $hasMinimal): static { $this->hasMinimal = $hasMinimal; return $this; }}