<?phpnamespace App\Domain\Entity;use DateTime;use DateTimeInterface;use App\Domain\Validator as CRLAssert;use Doctrine\DBAL\Types\Types;use Symfony\Component\Validator\Constraints as Assert;use Vich\UploaderBundle\Mapping\Annotation as Vich;/** * @CRLAssert\ContraintsValidarExpedienteRegistro */#[Vich\Uploadable]class DocumentacionRegistro extends Documentacion{ private ?string $fileSealing = null; /** * @Assert\File( * maxSize = "20M", * mimeTypes = {"application/pdf"}, * mimeTypesMessage = "file_format {{ type }} {{ types }}", * uploadErrorMessage = "file_upload {{ limit }}" * ) */ #[Vich\UploadableField(mapping: 'upload', fileNameProperty: 'fileSealing')] protected $fileSealingFile; private ?string $tipo = null; private ?string $numeroRegistro = null; private ?DateTimeInterface $fechaRegistro = null; private ?DateTimeInterface $horaRegistro = null; private ?Sede $sede = null; private ?Expediente $expediente = null; private ?string $observaciones = null; private ?CustomRegistro $custom = null; private ?Expediente $expedienteSolicitud = null; private ?SonataUserUser $creador = null; public function __construct() { $this->custom = new CustomRegistro(); } public function getTipo(): ?string { return $this->tipo; } public function setTipo(?string $tipo): static { $this->tipo = $tipo; return $this; } public function getNumeroRegistro(): ?string { return $this->numeroRegistro; } public function setNumeroRegistro(?string $numeroRegistro): static { $this->numeroRegistro = $numeroRegistro; return $this; } public function getFechaRegistro(): ?DateTimeInterface { return $this->fechaRegistro; } public function setFechaRegistro(?DateTimeInterface $fechaRegistro): static { $this->fechaRegistro = $fechaRegistro; return $this; } public function getHoraRegistro(): ?DateTimeInterface { return $this->horaRegistro; } public function setHoraRegistro(?DateTimeInterface $horaRegistro): static { $this->horaRegistro = $horaRegistro; return $this; } public function getFechaHoraRegistro():?DateTimeInterface { $fecha = DateTime::createFromFormat('d/m/Y H:i:s', $this->getFechaRegistro()?->format('d/m/Y') . ' ' . $this->getHoraRegistro()?->format('H:i:s')); return $fecha ? $fecha : null; } public function getFechaHoraRegistroStr():?string { return $this->getFechaHoraRegistro()?->format('d/m/Y H:i:s'); } public function getObservaciones(): ?string { return $this->observaciones; } public function setObservaciones(?string $observaciones): static { $this->observaciones = $observaciones; return $this; } public function getExpediente(): ?Expediente { return $this->expediente; } public function setExpediente(?Expediente $expediente): static { $this->expediente = $expediente; return $this; } public function getSede(): ?Sede { return $this->sede; } public function setSede(?Sede $sede): static { $this->sede = $sede; return $this; } public function getCustom(): ?CustomRegistro { return $this->custom; } public function setCustom(?CustomRegistro $customRegistro): static { $this->custom = $customRegistro; return $this; } public function getExpedienteSolicitud(): ?Expediente { return $this->expedienteSolicitud; } public function setExpedienteSolicitud(?Expediente $expedienteSolicitud): static { // unset the owning side of the relation if necessary if ($expedienteSolicitud === null && $this->expedienteSolicitud !== null) { $this->expedienteSolicitud->setSolicitud(null); } // set the owning side of the relation if necessary if ($expedienteSolicitud !== null && $expedienteSolicitud->getSolicitud() !== $this) { $expedienteSolicitud->setSolicitud($this); } $this->expedienteSolicitud = $expedienteSolicitud; return $this; } public function getFileSealing(): ?string { return $this->fileSealing; } public function setFileSealing(?string $fileSealing): static { $this->fileSealing = $fileSealing; return $this; } /** * @return mixed */ public function getFileSealingFile() { return $this->fileSealingFile; } /** * @param mixed $fileSealingFile * @return Documentacion */ public function setFileSealingFile($fileSealingFile) { $this->fileSealingFile = $fileSealingFile; if (null !== $fileSealingFile) $this->updatedAt = new DateTime(); return $this; } public function getCreador(): ?SonataUserUser { return $this->creador; } public function setCreador(?SonataUserUser $creador): static { $this->creador = $creador; return $this; } public function getCreatedAtStr(): ?string { return parent::getCreatedAt()->format('d/m/Y H:i:s'); }}//class