src/Entity/Evento.php line 15

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. use Gedmo\Mapping\Annotation as Gedmo;
  8. /**
  9. * @ORM\Entity
  10. * @ORM\Table(name="evento")
  11. */
  12. class Evento
  13. {
  14. /**
  15. * @ORM\Id
  16. * @ORM\Column(type="integer")
  17. * @ORM\GeneratedValue(strategy="AUTO")
  18. */
  19. private $id;
  20. /**
  21. * @ORM\Column(type="string", nullable=true)
  22. */
  23. private $titulo;
  24. /**
  25. * @ORM\Column(type="string", nullable=true)
  26. */
  27. private $ubicacion;
  28. /**
  29. * @ORM\Column(type="string", nullable=true)
  30. */
  31. private $descripcionCorta;
  32. /**
  33. * @ORM\Column(type="string", nullable=true)
  34. */
  35. private $descripcion;
  36. /**
  37. * @ORM\Column(type="date", nullable=true)
  38. */
  39. private $fechaInicio;
  40. /**
  41. * @ORM\Column(type="date", nullable=true)
  42. */
  43. private $fechaFin;
  44. /**
  45. * @ORM\Column(type="datetime", nullable=true, name="deleted_at")
  46. */
  47. private $deletedAt;
  48. /**
  49. * @ORM\Column(type="datetime", nullable=false, name="updated_at", options={"default":"2024-01-01 00:00:00"})
  50. * @Gedmo\Timestampable(on="update")
  51. */
  52. private $updatedAt;
  53. /**
  54. * @ORM\Column(type="datetime", nullable=false, name="created_at", options={"default":"2024-01-01 00:00:00"})
  55. * @Gedmo\Timestampable(on="create")
  56. */
  57. private $createdAt;
  58. /**
  59. * @ORM\Column(type="datetime", nullable=true)
  60. */
  61. private $fechaInicioInscripcion;
  62. /**
  63. * @ORM\Column(type="datetime", nullable=true)
  64. */
  65. private $fechaFinInscripcion;
  66. /**
  67. * @ORM\Column(type="string", nullable=true)
  68. */
  69. private $imagenUrl;
  70. /**
  71. * @ORM\Column(type="float", nullable=true)
  72. */
  73. private $latitud;
  74. /**
  75. * @ORM\Column(type="float", nullable=true)
  76. */
  77. private $longitud;
  78. /**
  79. * @ORM\Column(type="integer", nullable=true)
  80. */
  81. private $aforo;
  82. /**
  83. * @ORM\Column(type="boolean", nullable=true)
  84. */
  85. private $inscribir;
  86. /**
  87. * @ORM\Column(type="boolean", nullable=true)
  88. */
  89. private $esPrivado;
  90. /**
  91. * @ORM\Column(type="boolean", nullable=true)
  92. */
  93. private $subscribed;
  94. /**
  95. * @ORM\OneToMany(targetEntity=\App\Entity\DocumentoEvento::class, mappedBy="evento")
  96. */
  97. private $documentoEventos;
  98. /**
  99. * @ORM\Column(type="integer", nullable=true)
  100. */
  101. private $emisorTipo;
  102. /**
  103. * @ORM\Column(type="boolean", nullable=true)
  104. */
  105. private $isPublico;
  106. /**
  107. * @ORM\Column(type="string", nullable=true, options={"default":"evento"})
  108. */
  109. private $type="evento";
  110. /**
  111. * @ORM\OneToMany(targetEntity=\App\Entity\FormularioRespuestas::class, mappedBy="evento")
  112. */
  113. private $formularioRespuestas;
  114. /**
  115. * @ORM\ManyToOne(targetEntity=\App\Entity\Calendario::class, inversedBy="eventos")
  116. * @ORM\JoinColumn(name="calendario_id", referencedColumnName="id")
  117. */
  118. private $calendario;
  119. /**
  120. * @ORM\ManyToOne(targetEntity=\App\Entity\Formulario::class, inversedBy="eventos")
  121. * @ORM\JoinColumn(name="formulario_id", referencedColumnName="id")
  122. */
  123. private $formulario;
  124. /**
  125. * @ORM\ManyToOne(targetEntity=\App\Entity\PropietarioContenido::class, inversedBy="eventos")
  126. * @ORM\JoinColumn(name="propietario_contenido_id", referencedColumnName="id")
  127. */
  128. private $propietarioContenidoEmisor;
  129. /**
  130. * @ORM\ManyToMany(targetEntity=\App\Entity\CategoriaEvento::class, inversedBy="eventos")
  131. * @ORM\JoinTable(
  132. * name="categoria_evento_to_evento",
  133. * joinColumns={@ORM\JoinColumn(name="evento_id", referencedColumnName="id", nullable=false)},
  134. * inverseJoinColumns={@ORM\JoinColumn(name="categoria_evento_id", referencedColumnName="id", nullable=false)}
  135. * )
  136. */
  137. private $categoriasevento;
  138. public function __construct()
  139. {
  140. $this->formularioRespuestas = new ArrayCollection();
  141. $this->documentoEventos = new ArrayCollection();
  142. $this->categoriasevento = new ArrayCollection();
  143. }
  144. public function getId(): ?int
  145. {
  146. return $this->id;
  147. }
  148. public function setId($id)
  149. {
  150. $this->id = $id;
  151. return $this;
  152. }
  153. public function getTitulo(): ?string
  154. {
  155. return $this->titulo;
  156. }
  157. public function setTitulo(?string $titulo): static
  158. {
  159. $this->titulo = $titulo;
  160. return $this;
  161. }
  162. public function getUbicacion(): ?string
  163. {
  164. return $this->ubicacion;
  165. }
  166. public function setUbicacion(?string $ubicacion): static
  167. {
  168. $this->ubicacion = $ubicacion;
  169. return $this;
  170. }
  171. public function getDescripcionCorta(): ?string
  172. {
  173. return $this->descripcionCorta;
  174. }
  175. public function setDescripcionCorta(?string $descripcionCorta): static
  176. {
  177. $this->descripcionCorta = $descripcionCorta;
  178. return $this;
  179. }
  180. public function getDescripcion(): ?string
  181. {
  182. return $this->descripcion;
  183. }
  184. public function setDescripcion(?string $descripcion): static
  185. {
  186. $this->descripcion = $descripcion;
  187. return $this;
  188. }
  189. public function getFechaInicio(): ?\DateTimeInterface
  190. {
  191. return $this->fechaInicio;
  192. }
  193. public function setFechaInicio(?\DateTimeInterface $fechaInicio): static
  194. {
  195. $this->fechaInicio = $fechaInicio;
  196. return $this;
  197. }
  198. public function getFechaFin(): ?\DateTimeInterface
  199. {
  200. return $this->fechaFin;
  201. }
  202. public function setFechaFin(?\DateTimeInterface $fechaFin): static
  203. {
  204. $this->fechaFin = $fechaFin;
  205. return $this;
  206. }
  207. public function getDeletedAt(): ?\DateTimeInterface
  208. {
  209. return $this->deletedAt;
  210. }
  211. public function setDeletedAt(?\DateTimeInterface $deletedAt): static
  212. {
  213. $this->deletedAt = $deletedAt;
  214. return $this;
  215. }
  216. public function getUpdatedAt(): ?\DateTimeInterface
  217. {
  218. return $this->updatedAt;
  219. }
  220. public function setUpdatedAt(\DateTimeInterface $updatedAt): static
  221. {
  222. $this->updatedAt = $updatedAt;
  223. return $this;
  224. }
  225. public function getCreatedAt(): ?\DateTimeInterface
  226. {
  227. return $this->createdAt;
  228. }
  229. public function setCreatedAt(\DateTimeInterface $createdAt): static
  230. {
  231. $this->createdAt = $createdAt;
  232. return $this;
  233. }
  234. public function getFechaInicioInscripcion(): ?\DateTimeInterface
  235. {
  236. return $this->fechaInicioInscripcion;
  237. }
  238. public function setFechaInicioInscripcion(?\DateTimeInterface $fechaInicioInscripcion): static
  239. {
  240. $this->fechaInicioInscripcion = $fechaInicioInscripcion;
  241. return $this;
  242. }
  243. public function getFechaFinInscripcion(): ?\DateTimeInterface
  244. {
  245. return $this->fechaFinInscripcion;
  246. }
  247. public function setFechaFinInscripcion(?\DateTimeInterface $fechaFinInscripcion): static
  248. {
  249. $this->fechaFinInscripcion = $fechaFinInscripcion;
  250. return $this;
  251. }
  252. public function getImagenUrl(): ?string
  253. {
  254. return $this->imagenUrl;
  255. }
  256. public function setImagenUrl(?string $imagenUrl): static
  257. {
  258. $this->imagenUrl = $imagenUrl;
  259. return $this;
  260. }
  261. public function getLatitud(): ?float
  262. {
  263. return $this->latitud;
  264. }
  265. public function setLatitud(?float $latitud): static
  266. {
  267. $this->latitud = $latitud;
  268. return $this;
  269. }
  270. public function getLongitud(): ?float
  271. {
  272. return $this->longitud;
  273. }
  274. public function setLongitud(?float $longitud): static
  275. {
  276. $this->longitud = $longitud;
  277. return $this;
  278. }
  279. public function getAforo(): ?int
  280. {
  281. return $this->aforo;
  282. }
  283. public function setAforo(?int $aforo): static
  284. {
  285. $this->aforo = $aforo;
  286. return $this;
  287. }
  288. public function getInscribir(): ?bool
  289. {
  290. return $this->inscribir;
  291. }
  292. public function setInscribir(?bool $inscribir): static
  293. {
  294. $this->inscribir = $inscribir;
  295. return $this;
  296. }
  297. public function isEsPrivado(): ?bool
  298. {
  299. return $this->esPrivado;
  300. }
  301. public function setEsPrivado(?bool $esPrivado): static
  302. {
  303. $this->esPrivado = $esPrivado;
  304. return $this;
  305. }
  306. public function isSubscribed(): ?bool
  307. {
  308. return $this->subscribed;
  309. }
  310. public function setSubscribed(?bool $subscribed): static
  311. {
  312. $this->subscribed = $subscribed;
  313. return $this;
  314. }
  315. public function getEmisorTipo(): ?int
  316. {
  317. return $this->emisorTipo;
  318. }
  319. public function setEmisorTipo(?int $emisorTipo): static
  320. {
  321. $this->emisorTipo = $emisorTipo;
  322. return $this;
  323. }
  324. public function isIsPublico(): ?bool
  325. {
  326. return $this->isPublico;
  327. }
  328. /**
  329. * Alias publico para que ObjectMapper / mappers reflection-based generen la clave 'isPublico'
  330. * de forma consistente. Delega en el getter original (compat). No tocar isIsPublico().
  331. */
  332. public function isPublico(): ?bool
  333. {
  334. return $this->isIsPublico();
  335. }
  336. public function setIsPublico(?bool $isPublico): static
  337. {
  338. $this->isPublico = $isPublico;
  339. return $this;
  340. }
  341. /**
  342. * @return Collection<int, FormularioRespuestas>
  343. */
  344. public function getFormularioRespuestas(): Collection
  345. {
  346. return $this->formularioRespuestas;
  347. }
  348. public function addFormularioRespuesta(FormularioRespuestas $formularioRespuesta): static
  349. {
  350. if (!$this->formularioRespuestas->contains($formularioRespuesta)) {
  351. $this->formularioRespuestas->add($formularioRespuesta);
  352. $formularioRespuesta->setEvento($this);
  353. }
  354. return $this;
  355. }
  356. public function removeFormularioRespuesta(FormularioRespuestas $formularioRespuesta): static
  357. {
  358. if ($this->formularioRespuestas->removeElement($formularioRespuesta)) {
  359. // set the owning side to null (unless already changed)
  360. if ($formularioRespuesta->getEvento() === $this) {
  361. $formularioRespuesta->setEvento(null);
  362. }
  363. }
  364. return $this;
  365. }
  366. public function getCalendario(): ?Calendario
  367. {
  368. return $this->calendario;
  369. }
  370. public function setCalendario(?Calendario $calendario): static
  371. {
  372. $this->calendario = $calendario;
  373. return $this;
  374. }
  375. public function getFormulario(): ?Formulario
  376. {
  377. return $this->formulario;
  378. }
  379. public function setFormulario(?Formulario $formulario): static
  380. {
  381. $this->formulario = $formulario;
  382. return $this;
  383. }
  384. public function addDocumentoEvento(DocumentoEvento $documentoEvento): static
  385. {
  386. if (!$this->documentoEventos->contains($documentoEvento)) {
  387. $this->documentoEventos->add($documentoEvento);
  388. $documentoEvento->setEvento($this);
  389. }
  390. return $this;
  391. }
  392. public function removeDocumentoEvento(DocumentoEvento $documentoEvento): static
  393. {
  394. if ($this->documentoEventos->removeElement($documentoEvento)) {
  395. // set the owning side to null (unless already changed)
  396. if ($documentoEvento->getEvento() === $this) {
  397. $documentoEvento->setEvento(null);
  398. }
  399. }
  400. return $this;
  401. }
  402. /**
  403. * @return Collection<int, DocumentoEvento>
  404. */
  405. public function getDocumentoEventos(): Collection
  406. {
  407. return $this->documentoEventos;
  408. }
  409. /**
  410. * @return Collection<int, CategoriaEvento>
  411. */
  412. public function getCategoriasevento(): Collection
  413. {
  414. return $this->categoriasevento;
  415. }
  416. public function addCategoriasevento(CategoriaEvento $categoriasevento): static
  417. {
  418. if (!$this->categoriasevento->contains($categoriasevento)) {
  419. $this->categoriasevento->add($categoriasevento);
  420. }
  421. return $this;
  422. }
  423. public function removeCategoriasevento(CategoriaEvento $categoriasevento): static
  424. {
  425. $this->categoriasevento->removeElement($categoriasevento);
  426. return $this;
  427. }
  428. public function getType(): ?string
  429. {
  430. return $this->type;
  431. }
  432. public function setType(?string $type): static
  433. {
  434. $this->type = $type;
  435. return $this;
  436. }
  437. public function getPropietarioContenidoEmisor(): ?PropietarioContenido
  438. {
  439. return $this->propietarioContenidoEmisor;
  440. }
  441. public function setPropietarioContenidoEmisor(?PropietarioContenido $propietarioContenidoEmisor): static
  442. {
  443. $this->propietarioContenidoEmisor = $propietarioContenidoEmisor;
  444. return $this;
  445. }
  446. }