src/Entity/PlantillaAbstract.php line 20

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