src/Domain/Entity/Documentacion.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Domain\Entity;
  3. use App\Shared\Domain\ApplicationCore\Interfaces\EntityInterface;
  4. use DateTime;
  5. use DateTimeInterface;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Symfony\Component\Uid\Uuid;
  9. use Symfony\Component\Validator\Constraints as Assert;
  10. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  11. //#[Vich\Uploadable]
  12. class Documentacion implements EntityInterface
  13. {
  14.     private $field;
  15.     private $tramiteKey;
  16.     private ?string $filename null;
  17.     /**
  18.      * @Assert\File(
  19.      *     maxSize = "20M",
  20.      *     mimeTypes = {"application/pdf"},
  21.      *     mimeTypesMessage = "file_format {{ type }} {{ types }}",
  22.      *     uploadErrorMessage = "file_upload {{ limit }}"
  23.      * )
  24.      */
  25.     #[Vich\UploadableField(mapping'upload'fileNameProperty'filename')]
  26.     protected $filenameFile;
  27.     private ?string $descripcion null;
  28.     private ?Uuid $id null;
  29.     private ?Entidad $entidad null;
  30.     private ?DateTimeInterface $createdAt;
  31.     private ?DateTimeInterface $updatedAt;
  32.     private ?DateTimeInterface $deletedAt;
  33.     public function __toString(): string
  34.     {
  35.         return $this->descripcion??"";
  36.     }
  37.     public function getFilename(): ?string
  38.     {
  39.         return $this->filename;
  40.     }
  41.     public function setFilename(?string $filename): static
  42.     {
  43.         $this->filename $filename;
  44.         return $this;
  45.     }
  46.     public function getCreatedAt(): ?DateTimeInterface
  47.     {
  48.         return $this->createdAt;
  49.     }
  50.     public function setCreatedAt(?DateTimeInterface $createdAt): static
  51.     {
  52.         $this->createdAt $createdAt;
  53.         return $this;
  54.     }
  55.     public function getDescripcion(): ?string
  56.     {
  57.         return $this->descripcion;
  58.     }
  59.     public function setDescripcion(?string $descripcion): static
  60.     {
  61.         $this->descripcion $descripcion;
  62.         return $this;
  63.     }
  64.     public function getId(): ?Uuid
  65.     {
  66.         return $this->id;
  67.     }
  68.     public function getEntidad(): ?Entidad
  69.     {
  70.         return $this->entidad;
  71.     }
  72.     public function setEntidad(?Entidad $entidad): static
  73.     {
  74.         $this->entidad $entidad;
  75.         return $this;
  76.     }
  77.     public function getUpdatedAt(): ?DateTimeInterface
  78.     {
  79.         return $this->updatedAt;
  80.     }
  81.     public function setUpdatedAt(DateTimeInterface $updatedAt): static
  82.     {
  83.         $this->updatedAt $updatedAt;
  84.         return $this;
  85.     }
  86.     public function getDeletedAt(): ?DateTimeInterface
  87.     {
  88.         return $this->deletedAt;
  89.     }
  90.     public function setDeletedAt(?DateTimeInterface $deletedAt): static
  91.     {
  92.         $this->deletedAt $deletedAt;
  93.         return $this;
  94.     }
  95.     /**
  96.      * @return mixed
  97.      */
  98.     public function getFilenameFile()
  99.     {
  100.         return $this->filenameFile;
  101.     }
  102.     /**
  103.      * @param mixed $filenameFile
  104.      * @return Documentacion
  105.      */
  106.     public function setFilenameFile($filenameFile)
  107.     {
  108.         $this->filenameFile $filenameFile;
  109.         if (null !== $filenameFile$this->updatedAt = new DateTime();
  110.         return $this;
  111.     }
  112.     public function getField(): ?string
  113.     {
  114.         return $this->field;
  115.     }
  116.     public function setField(?string $field): static
  117.     {
  118.         $this->field $field;
  119.         return $this;
  120.     }
  121.     public function getTramiteKey(): ?string
  122.     {
  123.         return $this->tramiteKey;
  124.     }
  125.     public function setTramiteKey(?string $tramiteKey): static
  126.     {
  127.         $this->tramiteKey $tramiteKey;
  128.         return $this;
  129.     }
  130. }//class