<?phpnamespace App\Entity;use App\Repository\ParCuestionarioPreguntaRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ParCuestionarioPreguntaRepository::class)]class ParCuestionarioPregunta{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255)] private ?string $titulo = null; #[ORM\Column] private ?int $tipo = null; #[ORM\Column(length: 255, nullable: true)] private ?string $respuesta = null; #[ORM\Column(type: Types::DATETIME_MUTABLE)] private ?\DateTimeInterface $createAt = null; #[ORM\Column(length: 50)] private ?string $createUser = null; #[ORM\Column(type: Types::DATETIME_MUTABLE)] private ?\DateTimeInterface $updateAt = null; #[ORM\Column(length: 50)] private ?string $updateUser = null; #[ORM\ManyToOne(inversedBy: 'cuestionarioPreguntas')] private ?ParCuestionario $cuestionario = null; #[ORM\ManyToOne(inversedBy: 'cuestionarioPreguntas')] private ?ParEstado $estado = null; #[ORM\OneToMany(mappedBy: 'cuestionarioPregunta', targetEntity: ParCuestionarioPreguntaOpcion::class)] private Collection $cuestionarioPreguntaOpciones; #[ORM\OneToMany(mappedBy: 'cuestionarioPregunta', targetEntity: ParCuestionarioAsignacionResultado::class)] private Collection $cuestionarioAsignacionResultados; public function __construct() { $this->cuestionarioPreguntaOpciones = new ArrayCollection(); $this->cuestionarioAsignacionResultados = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getTitulo(): ?string { return $this->titulo; } public function setTitulo(string $titulo): static { $this->titulo = $titulo; return $this; } public function getTipo(): ?int { return $this->tipo; } public function setTipo(int $tipo): static { $this->tipo = $tipo; return $this; } public function getRespuesta(): ?string { return $this->respuesta; } public function setRespuesta(?string $respuesta): static { $this->respuesta = $respuesta; return $this; } public function getCreateAt(): ?\DateTimeInterface { return $this->createAt; } public function setCreateAt(\DateTimeInterface $createAt): static { $this->createAt = $createAt; return $this; } public function getCreateUser(): ?string { return $this->createUser; } public function setCreateUser(string $createUser): static { $this->createUser = $createUser; return $this; } public function getUpdateAt(): ?\DateTimeInterface { return $this->updateAt; } public function setUpdateAt(\DateTimeInterface $updateAt): static { $this->updateAt = $updateAt; return $this; } public function getUpdateUser(): ?string { return $this->updateUser; } public function setUpdateUser(string $updateUser): static { $this->updateUser = $updateUser; return $this; } public function getCuestionario(): ?ParCuestionario { return $this->cuestionario; } public function setCuestionario(?ParCuestionario $cuestionario): static { $this->cuestionario = $cuestionario; return $this; } public function getEstado(): ?ParEstado { return $this->estado; } public function setEstado(?ParEstado $estado): static { $this->estado = $estado; return $this; } /** * @return Collection<int, ParCuestionarioPreguntaOpcion> */ public function getCuestionarioPreguntaOpciones(): Collection { return $this->cuestionarioPreguntaOpciones; } public function addCuestionarioPreguntaOpcione(ParCuestionarioPreguntaOpcion $cuestionarioPreguntaOpcione): static { if (!$this->cuestionarioPreguntaOpciones->contains($cuestionarioPreguntaOpcione)) { $this->cuestionarioPreguntaOpciones->add($cuestionarioPreguntaOpcione); $cuestionarioPreguntaOpcione->setCuestionarioPregunta($this); } return $this; } public function removeCuestionarioPreguntaOpcione(ParCuestionarioPreguntaOpcion $cuestionarioPreguntaOpcione): static { if ($this->cuestionarioPreguntaOpciones->removeElement($cuestionarioPreguntaOpcione)) { // set the owning side to null (unless already changed) if ($cuestionarioPreguntaOpcione->getCuestionarioPregunta() === $this) { $cuestionarioPreguntaOpcione->setCuestionarioPregunta(null); } } return $this; } /** * @return Collection<int, ParCuestionarioAsignacionResultado> */ public function getCuestionarioAsignacionResultados(): Collection { return $this->cuestionarioAsignacionResultados; } public function addCuestionarioAsignacionResultado(ParCuestionarioAsignacionResultado $cuestionarioAsignacionResultado): static { if (!$this->cuestionarioAsignacionResultados->contains($cuestionarioAsignacionResultado)) { $this->cuestionarioAsignacionResultados->add($cuestionarioAsignacionResultado); $cuestionarioAsignacionResultado->setCuestionarioPregunta($this); } return $this; } public function removeCuestionarioAsignacionResultado(ParCuestionarioAsignacionResultado $cuestionarioAsignacionResultado): static { if ($this->cuestionarioAsignacionResultados->removeElement($cuestionarioAsignacionResultado)) { // set the owning side to null (unless already changed) if ($cuestionarioAsignacionResultado->getCuestionarioPregunta() === $this) { $cuestionarioAsignacionResultado->setCuestionarioPregunta(null); } } return $this; }}