src/Domain/Entity/DocumentacionRegistro.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Domain\Entity;
  3. use DateTime;
  4. use DateTimeInterface;
  5. use App\Domain\Validator as CRLAssert;
  6. use Doctrine\DBAL\Types\Types;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  9. #[Vich\Uploadable]
  10. class DocumentacionRegistro extends Documentacion
  11. {
  12.     private ?string $fileSealing null;
  13.     /**
  14.      * @Assert\File(
  15.      *     maxSize = "20M",
  16.      *     mimeTypes = {"application/pdf"},
  17.      *     mimeTypesMessage = "file_format {{ type }} {{ types }}",
  18.      *     uploadErrorMessage = "file_upload {{ limit }}"
  19.      * )
  20.      */
  21.     #[Vich\UploadableField(mapping'upload'fileNameProperty'fileSealing')]
  22.     protected $fileSealingFile;
  23.     private ?string $tipo null;
  24.     private ?string $numeroRegistro null;
  25.     private ?DateTimeInterface $fechaRegistro null;
  26.     private ?DateTimeInterface $horaRegistro null;
  27.     private ?Sede $sede null;
  28.     private ?Expediente $expediente null;
  29.     private ?string $observaciones null;
  30.     private ?CustomRegistro $custom null;
  31.     private ?Expediente $expedienteSolicitud null;
  32.     private ?SonataUserUser $creador null;
  33.     public function __construct()
  34.     {
  35.         $this->custom = new CustomRegistro();
  36.     }
  37.     public function getTipo(): ?string
  38.     {
  39.         return $this->tipo;
  40.     }
  41.     public function setTipo(?string $tipo): static
  42.     {
  43.         $this->tipo $tipo;
  44.         return $this;
  45.     }
  46.     public function getNumeroRegistro(): ?string
  47.     {
  48.         return $this->numeroRegistro;
  49.     }
  50.     public function setNumeroRegistro(?string $numeroRegistro): static
  51.     {
  52.         $this->numeroRegistro $numeroRegistro;
  53.         return $this;
  54.     }
  55.     public function getFechaRegistro(): ?DateTimeInterface
  56.     {
  57.         return $this->fechaRegistro;
  58.     }
  59.     public function setFechaRegistro(?DateTimeInterface $fechaRegistro): static
  60.     {
  61.         $this->fechaRegistro $fechaRegistro;
  62.         return $this;
  63.     }
  64.     public function getHoraRegistro(): ?DateTimeInterface
  65.     {
  66.         return $this->horaRegistro;
  67.     }
  68.     public function setHoraRegistro(?DateTimeInterface $horaRegistro): static
  69.     {
  70.         $this->horaRegistro $horaRegistro;
  71.         return $this;
  72.     }
  73.     public function getFechaHoraRegistro():?DateTimeInterface
  74.     {
  75.         $fecha DateTime::createFromFormat('d/m/Y H:i:s'$this->getFechaRegistro()?->format('d/m/Y') . ' ' $this->getHoraRegistro()?->format('H:i:s'));
  76.         return $fecha $fecha null;
  77.     }
  78.     public function getFechaHoraRegistroStr():?string
  79.     {
  80.         return $this->getFechaHoraRegistro()?->format('d/m/Y H:i:s');
  81.     }
  82.     public function getObservaciones(): ?string
  83.     {
  84.         return $this->observaciones;
  85.     }
  86.     public function setObservaciones(?string $observaciones): static
  87.     {
  88.         $this->observaciones $observaciones;
  89.         return $this;
  90.     }
  91.     public function getExpediente(): ?Expediente
  92.     {
  93.         return $this->expediente;
  94.     }
  95.     public function setExpediente(?Expediente $expediente): static
  96.     {
  97.         $this->expediente $expediente;
  98.         return $this;
  99.     }
  100.     public function getSede(): ?Sede
  101.     {
  102.         return $this->sede;
  103.     }
  104.     public function setSede(?Sede $sede): static
  105.     {
  106.         $this->sede $sede;
  107.         return $this;
  108.     }
  109.     public function getCustom(): ?CustomRegistro
  110.     {
  111.         return $this->custom;
  112.     }
  113.     public function setCustom(?CustomRegistro $customRegistro): static
  114.     {
  115.         $this->custom $customRegistro;
  116.         return $this;
  117.     }
  118.     public function getExpedienteSolicitud(): ?Expediente
  119.     {
  120.         return $this->expedienteSolicitud;
  121.     }
  122.     public function setExpedienteSolicitud(?Expediente $expedienteSolicitud): static
  123.     {
  124.         // unset the owning side of the relation if necessary
  125.         if ($expedienteSolicitud === null && $this->expedienteSolicitud !== null) {
  126.             $this->expedienteSolicitud->setSolicitud(null);
  127.         }
  128.         // set the owning side of the relation if necessary
  129.         if ($expedienteSolicitud !== null && $expedienteSolicitud->getSolicitud() !== $this) {
  130.             $expedienteSolicitud->setSolicitud($this);
  131.         }
  132.         $this->expedienteSolicitud $expedienteSolicitud;
  133.         return $this;
  134.     }
  135.     public function getFileSealing(): ?string
  136.     {
  137.         return $this->fileSealing;
  138.     }
  139.     public function setFileSealing(?string $fileSealing): static
  140.     {
  141.         $this->fileSealing $fileSealing;
  142.         return $this;
  143.     }
  144.     /**
  145.      * @return mixed
  146.      */
  147.     public function getFileSealingFile()
  148.     {
  149.         return $this->fileSealingFile;
  150.     }
  151.     /**
  152.      * @param mixed $fileSealingFile
  153.      * @return Documentacion
  154.      */
  155.     public function setFileSealingFile($fileSealingFile)
  156.     {
  157.         $this->fileSealingFile $fileSealingFile;
  158.         if (null !== $fileSealingFile$this->updatedAt = new DateTime();
  159.         return $this;
  160.     }
  161.     public function getCreador(): ?SonataUserUser
  162.     {
  163.         return $this->creador;
  164.     }
  165.     public function setCreador(?SonataUserUser $creador): static
  166.     {
  167.         $this->creador $creador;
  168.         return $this;
  169.     }
  170.     public function getCreatedAtStr(): ?string
  171.     {
  172.         return parent::getCreatedAt()->format('d/m/Y H:i:s');
  173.     }
  174. }//class