src/Entity/Formulario.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8. * @ORM\Entity
  9. */
  10. class Formulario
  11. {
  12. /**
  13. * @ORM\Id
  14. * @ORM\Column(type="integer")
  15. * @ORM\GeneratedValue(strategy="AUTO")
  16. */
  17. private $id;
  18. /**
  19. * @ORM\Column(type="string", nullable=true)
  20. */
  21. private $slug;
  22. /**
  23. * @ORM\Column(type="string", nullable=true)
  24. */
  25. private $titulo;
  26. /**
  27. * @ORM\Column(type="text", nullable=true)
  28. */
  29. private $descripcion;
  30. /**
  31. * @ORM\Column(type="datetime", nullable=true)
  32. */
  33. private $fechaAlta;
  34. /**
  35. * @ORM\Column(type="string", nullable=true)
  36. */
  37. private $documento;
  38. /**
  39. * @ORM\Column(type="string", nullable=true)
  40. */
  41. private $inputs;
  42. /**
  43. * @ORM\Column(type="string", nullable=true)
  44. */
  45. private $destinatarios1;
  46. /**
  47. * @ORM\Column(type="datetime", nullable=true)
  48. */
  49. private $fechaBaja;
  50. /**
  51. * @ORM\Column(type="boolean", nullable=true)
  52. */
  53. private $inscripcionUnica;
  54. /**
  55. * @ORM\Column(type="datetime", nullable=true)
  56. */
  57. private $createdAt;
  58. /**
  59. * @ORM\Column(type="datetime", nullable=true)
  60. */
  61. private $updatedAt;
  62. /**
  63. * @ORM\OneToMany(targetEntity=\App\Entity\Evento::class, mappedBy="formulario")
  64. */
  65. private $eventos;
  66. /**
  67. * @ORM\OneToMany(targetEntity=\App\Entity\FormularioRespuestas::class, mappedBy="formulario")
  68. */
  69. private $formularioRespuestas;
  70. /**
  71. * @ORM\ManyToOne(targetEntity=\App\Entity\PropietarioContenido::class, inversedBy="formulariosEmisor")
  72. * @ORM\JoinColumn(name="propietario_contenido_id", referencedColumnName="id")
  73. */
  74. private $propietarioContenidoEmisor;
  75. /**
  76. * @ORM\ManyToMany(targetEntity=\App\Entity\CategoriaFormulario::class, inversedBy="formularios")
  77. * @ORM\JoinTable(
  78. * name="CategoriaFormularioToFormulario",
  79. * joinColumns={@ORM\JoinColumn(name="formulario_id", referencedColumnName="id", nullable=false)},
  80. * inverseJoinColumns={@ORM\JoinColumn(name="categoria_formulario_id", referencedColumnName="id", nullable=false)}
  81. * )
  82. */
  83. private $categorias;
  84. public function __construct()
  85. {
  86. $this->eventos = new ArrayCollection();
  87. $this->formularioRespuestas = new ArrayCollection();
  88. $this->categorias = new ArrayCollection();
  89. }
  90. public function getId(): ?int
  91. {
  92. return $this->id;
  93. }
  94. public function setId($id)
  95. {
  96. $this->id = $id;
  97. return $this;
  98. }
  99. public function getSlug(): ?string
  100. {
  101. return $this->slug;
  102. }
  103. public function setSlug(?string $slug): static
  104. {
  105. $this->slug = $slug;
  106. return $this;
  107. }
  108. public function getTitulo(): ?string
  109. {
  110. return $this->titulo;
  111. }
  112. public function setTitulo(?string $titulo): static
  113. {
  114. $this->titulo = $titulo;
  115. return $this;
  116. }
  117. public function getDescripcion(): ?string
  118. {
  119. return $this->descripcion;
  120. }
  121. public function setDescripcion(?string $descripcion): static
  122. {
  123. $this->descripcion = $descripcion;
  124. return $this;
  125. }
  126. public function getFechaAlta(): ?\DateTimeInterface
  127. {
  128. return $this->fechaAlta;
  129. }
  130. public function setFechaAlta(?\DateTimeInterface $fechaAlta): static
  131. {
  132. $this->fechaAlta = $fechaAlta;
  133. return $this;
  134. }
  135. public function getDocumento(): ?string
  136. {
  137. return $this->documento;
  138. }
  139. public function setDocumento(?string $documento): static
  140. {
  141. $this->documento = $documento;
  142. return $this;
  143. }
  144. public function getInputs(): ?string
  145. {
  146. return $this->inputs;
  147. }
  148. public function setInputs(?string $inputs): static
  149. {
  150. $this->inputs = $inputs;
  151. return $this;
  152. }
  153. public function getDestinatarios1(): ?string
  154. {
  155. return $this->destinatarios1;
  156. }
  157. public function setDestinatarios1(?string $destinatarios1): static
  158. {
  159. $this->destinatarios1 = $destinatarios1;
  160. return $this;
  161. }
  162. public function getFechaBaja(): ?\DateTimeInterface
  163. {
  164. return $this->fechaBaja;
  165. }
  166. public function setFechaBaja(?\DateTimeInterface $fechaBaja): static
  167. {
  168. $this->fechaBaja = $fechaBaja;
  169. return $this;
  170. }
  171. public function isInscripcionUnica(): ?bool
  172. {
  173. return $this->inscripcionUnica;
  174. }
  175. public function setInscripcionUnica(?bool $inscripcionUnica): static
  176. {
  177. $this->inscripcionUnica = $inscripcionUnica;
  178. return $this;
  179. }
  180. public function getCreatedAt(): ?\DateTimeInterface
  181. {
  182. return $this->createdAt;
  183. }
  184. public function setCreatedAt(?\DateTimeInterface $createdAt): static
  185. {
  186. $this->createdAt = $createdAt;
  187. return $this;
  188. }
  189. public function getUpdatedAt(): ?\DateTimeInterface
  190. {
  191. return $this->updatedAt;
  192. }
  193. public function setUpdatedAt(?\DateTimeInterface $updatedAt): static
  194. {
  195. $this->updatedAt = $updatedAt;
  196. return $this;
  197. }
  198. /**
  199. * @return Collection<int, Evento>
  200. */
  201. public function getEventos(): Collection
  202. {
  203. return $this->eventos;
  204. }
  205. public function addEvento(Evento $evento): static
  206. {
  207. if (!$this->eventos->contains($evento)) {
  208. $this->eventos->add($evento);
  209. $evento->setFormulario($this);
  210. }
  211. return $this;
  212. }
  213. public function removeEvento(Evento $evento): static
  214. {
  215. if ($this->eventos->removeElement($evento)) {
  216. // set the owning side to null (unless already changed)
  217. if ($evento->getFormulario() === $this) {
  218. $evento->setFormulario(null);
  219. }
  220. }
  221. return $this;
  222. }
  223. /**
  224. * @return Collection<int, FormularioRespuestas>
  225. */
  226. public function getFormularioRespuestas(): Collection
  227. {
  228. return $this->formularioRespuestas;
  229. }
  230. public function addFormularioRespuesta(FormularioRespuestas $formularioRespuesta): static
  231. {
  232. if (!$this->formularioRespuestas->contains($formularioRespuesta)) {
  233. $this->formularioRespuestas->add($formularioRespuesta);
  234. $formularioRespuesta->setFormulario($this);
  235. }
  236. return $this;
  237. }
  238. public function removeFormularioRespuesta(FormularioRespuestas $formularioRespuesta): static
  239. {
  240. if ($this->formularioRespuestas->removeElement($formularioRespuesta)) {
  241. // set the owning side to null (unless already changed)
  242. if ($formularioRespuesta->getFormulario() === $this) {
  243. $formularioRespuesta->setFormulario(null);
  244. }
  245. }
  246. return $this;
  247. }
  248. public function getPropietarioContenidoEmisor(): ?PropietarioContenido
  249. {
  250. return $this->propietarioContenidoEmisor;
  251. }
  252. public function setPropietarioContenidoEmisor(?PropietarioContenido $propietarioContenidoEmisor): static
  253. {
  254. $this->propietarioContenidoEmisor = $propietarioContenidoEmisor;
  255. return $this;
  256. }
  257. /**
  258. * @return Collection<int, CategoriaFormulario>
  259. */
  260. public function getCategorias(): Collection
  261. {
  262. return $this->categorias;
  263. }
  264. public function addCategoria(CategoriaFormulario $categoria): static
  265. {
  266. if (!$this->categorias->contains($categoria)) {
  267. $this->categorias->add($categoria);
  268. }
  269. return $this;
  270. }
  271. public function removeCategoria(CategoriaFormulario $categoria): static
  272. {
  273. $this->categorias->removeElement($categoria);
  274. return $this;
  275. }
  276. }