src/Entity/ParCuestionarioPregunta.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ParCuestionarioPreguntaRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassParCuestionarioPreguntaRepository::class)]
  9. class ParCuestionarioPregunta
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $titulo null;
  17.     #[ORM\Column]
  18.     private ?int $tipo null;
  19.     #[ORM\Column(length255nullabletrue)]
  20.     private ?string $respuesta null;
  21.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  22.     private ?\DateTimeInterface $createAt null;
  23.     #[ORM\Column(length50)]
  24.     private ?string $createUser null;
  25.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  26.     private ?\DateTimeInterface $updateAt null;
  27.     #[ORM\Column(length50)]
  28.     private ?string $updateUser null;
  29.     #[ORM\ManyToOne(inversedBy'cuestionarioPreguntas')]
  30.     private ?ParCuestionario $cuestionario null;
  31.     #[ORM\ManyToOne(inversedBy'cuestionarioPreguntas')]
  32.     private ?ParEstado $estado null;
  33.     #[ORM\OneToMany(mappedBy'cuestionarioPregunta'targetEntityParCuestionarioPreguntaOpcion::class)]
  34.     private Collection $cuestionarioPreguntaOpciones;
  35.     #[ORM\OneToMany(mappedBy'cuestionarioPregunta'targetEntityParCuestionarioAsignacionResultado::class)]
  36.     private Collection $cuestionarioAsignacionResultados;
  37.     public function __construct()
  38.     {
  39.         $this->cuestionarioPreguntaOpciones = new ArrayCollection();
  40.         $this->cuestionarioAsignacionResultados = new ArrayCollection();
  41.     }
  42.     public function getId(): ?int
  43.     {
  44.         return $this->id;
  45.     }
  46.     public function getTitulo(): ?string
  47.     {
  48.         return $this->titulo;
  49.     }
  50.     public function setTitulo(string $titulo): static
  51.     {
  52.         $this->titulo $titulo;
  53.         return $this;
  54.     }
  55.     public function getTipo(): ?int
  56.     {
  57.         return $this->tipo;
  58.     }
  59.     public function setTipo(int $tipo): static
  60.     {
  61.         $this->tipo $tipo;
  62.         return $this;
  63.     }
  64.     public function getRespuesta(): ?string
  65.     {
  66.         return $this->respuesta;
  67.     }
  68.     public function setRespuesta(?string $respuesta): static
  69.     {
  70.         $this->respuesta $respuesta;
  71.         return $this;
  72.     }
  73.     public function getCreateAt(): ?\DateTimeInterface
  74.     {
  75.         return $this->createAt;
  76.     }
  77.     public function setCreateAt(\DateTimeInterface $createAt): static
  78.     {
  79.         $this->createAt $createAt;
  80.         return $this;
  81.     }
  82.     public function getCreateUser(): ?string
  83.     {
  84.         return $this->createUser;
  85.     }
  86.     public function setCreateUser(string $createUser): static
  87.     {
  88.         $this->createUser $createUser;
  89.         return $this;
  90.     }
  91.     public function getUpdateAt(): ?\DateTimeInterface
  92.     {
  93.         return $this->updateAt;
  94.     }
  95.     public function setUpdateAt(\DateTimeInterface $updateAt): static
  96.     {
  97.         $this->updateAt $updateAt;
  98.         return $this;
  99.     }
  100.     public function getUpdateUser(): ?string
  101.     {
  102.         return $this->updateUser;
  103.     }
  104.     public function setUpdateUser(string $updateUser): static
  105.     {
  106.         $this->updateUser $updateUser;
  107.         return $this;
  108.     }
  109.     public function getCuestionario(): ?ParCuestionario
  110.     {
  111.         return $this->cuestionario;
  112.     }
  113.     public function setCuestionario(?ParCuestionario $cuestionario): static
  114.     {
  115.         $this->cuestionario $cuestionario;
  116.         return $this;
  117.     }
  118.     public function getEstado(): ?ParEstado
  119.     {
  120.         return $this->estado;
  121.     }
  122.     public function setEstado(?ParEstado $estado): static
  123.     {
  124.         $this->estado $estado;
  125.         return $this;
  126.     }
  127.     /**
  128.      * @return Collection<int, ParCuestionarioPreguntaOpcion>
  129.      */
  130.     public function getCuestionarioPreguntaOpciones(): Collection
  131.     {
  132.         return $this->cuestionarioPreguntaOpciones;
  133.     }
  134.     public function addCuestionarioPreguntaOpcione(ParCuestionarioPreguntaOpcion $cuestionarioPreguntaOpcione): static
  135.     {
  136.         if (!$this->cuestionarioPreguntaOpciones->contains($cuestionarioPreguntaOpcione)) {
  137.             $this->cuestionarioPreguntaOpciones->add($cuestionarioPreguntaOpcione);
  138.             $cuestionarioPreguntaOpcione->setCuestionarioPregunta($this);
  139.         }
  140.         return $this;
  141.     }
  142.     public function removeCuestionarioPreguntaOpcione(ParCuestionarioPreguntaOpcion $cuestionarioPreguntaOpcione): static
  143.     {
  144.         if ($this->cuestionarioPreguntaOpciones->removeElement($cuestionarioPreguntaOpcione)) {
  145.             // set the owning side to null (unless already changed)
  146.             if ($cuestionarioPreguntaOpcione->getCuestionarioPregunta() === $this) {
  147.                 $cuestionarioPreguntaOpcione->setCuestionarioPregunta(null);
  148.             }
  149.         }
  150.         return $this;
  151.     }
  152.     /**
  153.      * @return Collection<int, ParCuestionarioAsignacionResultado>
  154.      */
  155.     public function getCuestionarioAsignacionResultados(): Collection
  156.     {
  157.         return $this->cuestionarioAsignacionResultados;
  158.     }
  159.     public function addCuestionarioAsignacionResultado(ParCuestionarioAsignacionResultado $cuestionarioAsignacionResultado): static
  160.     {
  161.         if (!$this->cuestionarioAsignacionResultados->contains($cuestionarioAsignacionResultado)) {
  162.             $this->cuestionarioAsignacionResultados->add($cuestionarioAsignacionResultado);
  163.             $cuestionarioAsignacionResultado->setCuestionarioPregunta($this);
  164.         }
  165.         return $this;
  166.     }
  167.     public function removeCuestionarioAsignacionResultado(ParCuestionarioAsignacionResultado $cuestionarioAsignacionResultado): static
  168.     {
  169.         if ($this->cuestionarioAsignacionResultados->removeElement($cuestionarioAsignacionResultado)) {
  170.             // set the owning side to null (unless already changed)
  171.             if ($cuestionarioAsignacionResultado->getCuestionarioPregunta() === $this) {
  172.                 $cuestionarioAsignacionResultado->setCuestionarioPregunta(null);
  173.             }
  174.         }
  175.         return $this;
  176.     }
  177. }