src/Entity/PlantillaAbstract.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. use Symfony\Component\Uid\Uuid;
  7. /**
  8. * @ORM\Entity(repositoryClass="App\Repository\PlantillaAbstractRepository")
  9. * @ORM\Table(name="plantilla", schema="perseo")
  10. * @ORM\InheritanceType("SINGLE_TABLE")
  11. * @ORM\DiscriminatorColumn(name="type", type="string")
  12. * @ORM\DiscriminatorMap({
  13. * "correo":"App\Entity\PlantillaCorreo",
  14. * "contrato":"App\Entity\PlantillaContrato"
  15. * })
  16. * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false, hardDelete=true)
  17. */
  18. abstract class PlantillaAbstract
  19. {
  20. /**
  21. * @ORM\Id
  22. * @ORM\Column(type="uuid", unique=true)
  23. * @ORM\GeneratedValue(strategy="CUSTOM")
  24. * @ORM\CustomIdGenerator(class="doctrine.uuid_generator")
  25. */
  26. protected $id;
  27. /**
  28. * @ORM\Column(type="string", nullable=true)
  29. */
  30. protected $tipo;
  31. /**
  32. * @ORM\Column(type="string", length=2, nullable=true)
  33. */
  34. protected $idioma;
  35. /**
  36. * @ORM\Column(type="string", nullable=true)
  37. */
  38. private $alias;
  39. /**
  40. * @ORM\Column(type="string", nullable=true)
  41. */
  42. private $nombre;
  43. /**
  44. * @ORM\Column(type="string", nullable=true)
  45. */
  46. private $filename;
  47. /**
  48. * @ORM\Column(type="text", nullable=true)
  49. */
  50. protected $source;
  51. /**
  52. * @ORM\Column(type="text", nullable=true)
  53. */
  54. private $descripcion;
  55. /**
  56. * @ORM\Column(type="boolean", nullable=true)
  57. */
  58. private $active;
  59. /**
  60. * @ORM\Column(type="datetime", nullable=true, name="deleted_at")
  61. */
  62. protected $deletedAt;
  63. /**
  64. * @ORM\Column(type="datetime", nullable=false, name="updated_at", options={"default":"2022-01-01 00:00:00"})
  65. * @Gedmo\Timestampable(on="update")
  66. */
  67. protected $updatedAt;
  68. /**
  69. * @ORM\Column(type="datetime", nullable=false, name="created_at", options={"default":"2022-01-01 00:00:00"})
  70. * @Gedmo\Timestampable(on="create")
  71. */
  72. protected $createdAt;
  73. public function __toString(): string
  74. {
  75. return $this->getAlias().'';
  76. }
  77. public function getId(): ?Uuid
  78. {
  79. return $this->id;
  80. }
  81. public function getFilename(): ?string
  82. {
  83. return $this->filename;
  84. }
  85. public function setFilename(?string $filename): self
  86. {
  87. $this->filename = $filename;
  88. return $this;
  89. }
  90. public function getSource(): ?string
  91. {
  92. return $this->source;
  93. }
  94. public function setSource(?string $source): self
  95. {
  96. $this->source = $source;
  97. return $this;
  98. }
  99. public function getIdioma(): ?string
  100. {
  101. return $this->idioma;
  102. }
  103. public function setIdioma(?string $idioma): self
  104. {
  105. $this->idioma = $idioma;
  106. return $this;
  107. }
  108. public function getDeletedAt(): ?\DateTimeInterface
  109. {
  110. return $this->deletedAt;
  111. }
  112. public function setDeletedAt(?\DateTimeInterface $deletedAt): self
  113. {
  114. $this->deletedAt = $deletedAt;
  115. return $this;
  116. }
  117. public function getUpdatedAt(): ?\DateTimeInterface
  118. {
  119. return $this->updatedAt;
  120. }
  121. public function setUpdatedAt(\DateTimeInterface $updatedAt): self
  122. {
  123. $this->updatedAt = $updatedAt;
  124. return $this;
  125. }
  126. public function getCreatedAt(): ?\DateTimeInterface
  127. {
  128. return $this->createdAt;
  129. }
  130. public function setCreatedAt(\DateTimeInterface $createdAt): self
  131. {
  132. $this->createdAt = $createdAt;
  133. return $this;
  134. }
  135. public function getAlias(): ?string
  136. {
  137. return $this->alias;
  138. }
  139. public function setAlias(?string $alias): self
  140. {
  141. $this->alias = $alias;
  142. return $this;
  143. }
  144. public function getDescripcion(): ?string
  145. {
  146. return $this->descripcion;
  147. }
  148. public function setDescripcion(?string $descripcion): static
  149. {
  150. $this->descripcion = $descripcion;
  151. return $this;
  152. }
  153. public function isActive(): ?bool
  154. {
  155. return $this->active;
  156. }
  157. public function setActive(?bool $active): static
  158. {
  159. $this->active = $active;
  160. return $this;
  161. }
  162. public function getNombre(): ?string
  163. {
  164. return $this->nombre;
  165. }
  166. public function setNombre(?string $nombre): static
  167. {
  168. $this->nombre = $nombre;
  169. return $this;
  170. }
  171. public function getTipo(): ?string
  172. {
  173. return $this->tipo;
  174. }
  175. public function setTipo(?string $tipo): static
  176. {
  177. $this->tipo = $tipo;
  178. return $this;
  179. }
  180. }