src/Entity/MantencionIncidencia.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\MantencionIncidenciaRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. use Symfony\Component\HttpFoundation\File\File;
  9. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  10. #[ORM\Entity(repositoryClassMantencionIncidenciaRepository::class)]
  11. #[Vich\Uploadable]
  12. class MantencionIncidencia
  13. {
  14.     #[ORM\Id]
  15.     #[ORM\GeneratedValue]
  16.     #[ORM\Column(type'integer')]
  17.     private ?int $id null;
  18.     #[ORM\Column(type'datetime')]
  19.     private ?\DateTimeInterface $fechaSolicitud null;
  20.     #[ORM\ManyToOne(targetEntityUser::class)]
  21.     #[ORM\JoinColumn(nullablefalse)]
  22.     private ?User $usuarioSolicitud null;
  23.     #[ORM\ManyToOne(targetEntityMantencionUrgencia::class)]
  24.     #[ORM\JoinColumn(nullablefalse)]
  25.     private ?MantencionUrgencia $urgencia null;
  26.     #[ORM\ManyToOne(targetEntityMantencionTipoComunicacion::class)]
  27.     #[ORM\JoinColumn(nullablefalse)]
  28.     private ?MantencionTipoComunicacion $tipoComunicacion null;
  29.     #[ORM\ManyToOne(targetEntityMantencionModulo::class)]
  30.     #[ORM\JoinColumn(nullablefalse)]
  31.     private ?MantencionModulo $modulo null;
  32.     #[ORM\ManyToOne(targetEntityMantencionEstado::class)]
  33.     #[ORM\JoinColumn(nullablefalse)]
  34.     private ?MantencionEstado $estado null;
  35.     #[ORM\Column(type'text')]
  36.     private ?string $detalle null;
  37.     #[ORM\Column(type'smallint'nullabletrue)]
  38.     private ?int $horasEstimadas null;
  39.     #[ORM\Column(type'boolean'nullabletrue)]
  40.     private ?bool $esAutorizada null;
  41.     #[ORM\ManyToOne(targetEntityMantencionResponsable::class)]
  42.     private ?MantencionResponsable $responsable null;
  43.     #[ORM\Column(type'smallint'nullabletrue)]
  44.     private ?int $horasEjecucion null;
  45.     #[ORM\ManyToOne(targetEntityMantencionPeriodo::class)]
  46.     #[ORM\JoinColumn(nullablefalse)]
  47.     private ?MantencionPeriodo $periodo null;
  48.     #[ORM\OneToMany(mappedBy'incidencia'targetEntityMantencionHistorial::class)]
  49.     private Collection $mantencionHistorials;
  50.     #[ORM\Column(type'boolean'nullabletrue)]
  51.     private ?bool $esAprobada null;
  52.     #[ORM\ManyToOne(targetEntityMantencionClasificacion::class)]
  53.     private ?MantencionClasificacion $clasificacion null;
  54.     #[ORM\Column(type'datetime'nullabletrue)]
  55.     private ?\DateTimeInterface $fechaActualizacion null;
  56.     #[ORM\Column(length255nullabletrue)]
  57.     private ?string $documento01Name null;
  58.     #[Vich\UploadableField(mapping'soporte_tecnico_documentos'fileNameProperty'documento01Name')]
  59.     #[Assert\File(maxSize'200Mi')]
  60.     private ?File $documento01File null;
  61.     #[ORM\Column(length255nullabletrue)]
  62.     private ?string $documento02Name null;
  63.     #[Vich\UploadableField(mapping'soporte_tecnico_documentos'fileNameProperty'documento02Name')]
  64.     #[Assert\File(maxSize'200Mi')]
  65.     private ?File $documento02File null;
  66.     #[ORM\Column(length255nullabletrue)]
  67.     private ?string $documento03Name null;
  68.     #[Vich\UploadableField(mapping'soporte_tecnico_documentos'fileNameProperty'documento03Name')]
  69.     #[Assert\File(maxSize'200Mi')]
  70.     private ?File $documento03File null;
  71.     #[ORM\Column(length255nullabletrue)]
  72.     private ?string $documento04Name null;
  73.     #[Vich\UploadableField(mapping'soporte_tecnico_documentos'fileNameProperty'documento04Name')]
  74.     #[Assert\File(maxSize'200Mi')]
  75.     private ?File $documento04File null;
  76.     #[ORM\Column(length255nullabletrue)]
  77.     private ?string $documento05Name null;
  78.     #[Vich\UploadableField(mapping'soporte_tecnico_documentos'fileNameProperty'documento05Name')]
  79.     #[Assert\File(maxSize'200Mi')]
  80.     private ?File $documento05File null;
  81.     #[ORM\Column(type'text'nullabletrue)]
  82.     private ?string $respuesta null;
  83.     #[ORM\Column(type'datetime'nullabletrue)]
  84.     private ?\DateTimeInterface $fechaCierre null;
  85.     public function __construct()
  86.     {
  87.         $this->mantencionHistorials = new ArrayCollection();
  88.     }
  89.     public function getId(): ?int { return $this->id; }
  90.     public function getFechaSolicitud(): ?\DateTimeInterface
  91. {
  92.     return $this->fechaSolicitud;
  93. }
  94. public function setFechaSolicitud(?\DateTimeInterface $fechaSolicitud): self
  95. {
  96.     $this->fechaSolicitud $fechaSolicitud;
  97.     return $this;
  98. }
  99. public function getUsuarioSolicitud(): ?User
  100. {
  101.     return $this->usuarioSolicitud;
  102. }
  103. public function setUsuarioSolicitud(?User $usuarioSolicitud): self
  104. {
  105.     $this->usuarioSolicitud $usuarioSolicitud;
  106.     return $this;
  107. }
  108. public function getUrgencia(): ?MantencionUrgencia
  109. {
  110.     return $this->urgencia;
  111. }
  112. public function setUrgencia(?MantencionUrgencia $urgencia): self
  113. {
  114.     $this->urgencia $urgencia;
  115.     return $this;
  116. }
  117. public function getTipoComunicacion(): ?MantencionTipoComunicacion
  118. {
  119.     return $this->tipoComunicacion;
  120. }
  121. public function setTipoComunicacion(?MantencionTipoComunicacion $tipoComunicacion): self
  122. {
  123.     $this->tipoComunicacion $tipoComunicacion;
  124.     return $this;
  125. }
  126. public function getModulo(): ?MantencionModulo
  127. {
  128.     return $this->modulo;
  129. }
  130. public function setModulo(?MantencionModulo $modulo): self
  131. {
  132.     $this->modulo $modulo;
  133.     return $this;
  134. }
  135. public function getEstado(): ?MantencionEstado
  136. {
  137.     return $this->estado;
  138. }
  139. public function setEstado(?MantencionEstado $estado): self
  140. {
  141.     $this->estado $estado;
  142.     return $this;
  143. }
  144. public function getDetalle(): ?string
  145. {
  146.     return $this->detalle;
  147. }
  148. public function setDetalle(?string $detalle): self
  149. {
  150.     $this->detalle $detalle;
  151.     return $this;
  152. }
  153. public function getHorasEstimadas(): ?int
  154. {
  155.     return $this->horasEstimadas;
  156. }
  157. public function setHorasEstimadas(?int $horasEstimadas): self
  158. {
  159.     $this->horasEstimadas $horasEstimadas;
  160.     return $this;
  161. }
  162. public function getEsAutorizada(): ?bool
  163. {
  164.     return $this->esAutorizada;
  165. }
  166. public function setEsAutorizada(?bool $esAutorizada): self
  167. {
  168.     $this->esAutorizada $esAutorizada;
  169.     return $this;
  170. }
  171. public function getResponsable(): ?MantencionResponsable
  172. {
  173.     return $this->responsable;
  174. }
  175. public function setResponsable(?MantencionResponsable $responsable): self
  176. {
  177.     $this->responsable $responsable;
  178.     return $this;
  179. }
  180. public function getHorasEjecucion(): ?int
  181. {
  182.     return $this->horasEjecucion;
  183. }
  184. public function setHorasEjecucion(?int $horasEjecucion): self
  185. {
  186.     $this->horasEjecucion $horasEjecucion;
  187.     return $this;
  188. }
  189. public function getPeriodo(): ?MantencionPeriodo
  190. {
  191.     return $this->periodo;
  192. }
  193. public function setPeriodo(?MantencionPeriodo $periodo): self
  194. {
  195.     $this->periodo $periodo;
  196.     return $this;
  197. }
  198. public function getMantencionHistorials(): Collection
  199. {
  200.     return $this->mantencionHistorials;
  201. }
  202. public function addMantencionHistorial(MantencionHistorial $mantencionHistorial): self
  203. {
  204.     if (!$this->mantencionHistorials->contains($mantencionHistorial)) {
  205.         $this->mantencionHistorials[] = $mantencionHistorial;
  206.         $mantencionHistorial->setIncidencia($this);
  207.     }
  208.     return $this;
  209. }
  210. public function removeMantencionHistorial(MantencionHistorial $mantencionHistorial): self
  211. {
  212.     if ($this->mantencionHistorials->removeElement($mantencionHistorial)) {
  213.         if ($mantencionHistorial->getIncidencia() === $this) {
  214.             $mantencionHistorial->setIncidencia(null);
  215.         }
  216.     }
  217.     return $this;
  218. }
  219. public function getEsAprobada(): ?bool
  220. {
  221.     return $this->esAprobada;
  222. }
  223. public function setEsAprobada(?bool $esAprobada): self
  224. {
  225.     $this->esAprobada $esAprobada;
  226.     return $this;
  227. }
  228. public function getClasificacion(): ?MantencionClasificacion
  229. {
  230.     return $this->clasificacion;
  231. }
  232. public function setClasificacion(?MantencionClasificacion $clasificacion): self
  233. {
  234.     $this->clasificacion $clasificacion;
  235.     return $this;
  236. }
  237. public function getFechaActualizacion(): ?\DateTimeInterface
  238. {
  239.     return $this->fechaActualizacion;
  240. }
  241. public function setFechaActualizacion(?\DateTimeInterface $fechaActualizacion): self
  242. {
  243.     $this->fechaActualizacion $fechaActualizacion;
  244.     return $this;
  245. }
  246. public function getDocumento01Name(): ?string
  247. {
  248.     return $this->documento01Name;
  249. }
  250. public function setDocumento01Name(?string $documento01Name): self
  251. {
  252.     $this->documento01Name $documento01Name;
  253.     return $this;
  254. }
  255. public function getDocumento01File(): ?File
  256. {
  257.     return $this->documento01File;
  258. }
  259. public function setDocumento01File(?File $documento01File): self
  260. {
  261.     $this->documento01File $documento01File;
  262.     if ($documento01File) {
  263.         $this->fechaActualizacion = new \DateTimeImmutable();
  264.     }
  265.     return $this;
  266. }
  267. public function getDocumento02Name(): ?string
  268. {
  269.     return $this->documento02Name;
  270. }
  271. public function setDocumento02Name(?string $documento02Name): self
  272. {
  273.     $this->documento02Name $documento02Name;
  274.     return $this;
  275. }
  276. public function getDocumento02File(): ?File
  277. {
  278.     return $this->documento02File;
  279. }
  280. public function setDocumento02File(?File $documento02File): self
  281. {
  282.     $this->documento02File $documento02File;
  283.     if ($documento02File) {
  284.         $this->fechaActualizacion = new \DateTimeImmutable();
  285.     }
  286.     return $this;
  287. }
  288. public function getDocumento03Name(): ?string
  289. {
  290.     return $this->documento03Name;
  291. }
  292. public function setDocumento03Name(?string $documento03Name): self
  293. {
  294.     $this->documento03Name $documento03Name;
  295.     return $this;
  296. }
  297. public function getDocumento03File(): ?File
  298. {
  299.     return $this->documento03File;
  300. }
  301. public function setDocumento03File(?File $documento03File): self
  302. {
  303.     $this->documento03File $documento03File;
  304.     if ($documento03File) {
  305.         $this->fechaActualizacion = new \DateTimeImmutable();
  306.     }
  307.     return $this;
  308. }
  309. public function getDocumento04Name(): ?string
  310. {
  311.     return $this->documento04Name;
  312. }
  313. public function setDocumento04Name(?string $documento04Name): self
  314. {
  315.     $this->documento04Name $documento04Name;
  316.     return $this;
  317. }
  318. public function getDocumento04File(): ?File
  319. {
  320.     return $this->documento04File;
  321. }
  322. public function setDocumento04File(?File $documento04File): self
  323. {
  324.     $this->documento04File $documento04File;
  325.     if ($documento04File) {
  326.         $this->fechaActualizacion = new \DateTimeImmutable();
  327.     }
  328.     return $this;
  329. }
  330. public function getDocumento05Name(): ?string
  331. {
  332.     return $this->documento05Name;
  333. }
  334. public function setDocumento05Name(?string $documento05Name): self
  335. {
  336.     $this->documento05Name $documento05Name;
  337.     return $this;
  338. }
  339. public function getDocumento05File(): ?File
  340. {
  341.     return $this->documento05File;
  342. }
  343. public function setDocumento05File(?File $documento05File): self
  344. {
  345.     $this->documento05File $documento05File;
  346.     if ($documento05File) {
  347.         $this->fechaActualizacion = new \DateTimeImmutable();
  348.     }
  349.     return $this;
  350. }
  351. public function getRespuesta(): ?string
  352. {
  353.     return $this->respuesta;
  354. }
  355. public function setRespuesta(?string $respuesta): self
  356. {
  357.     $this->respuesta $respuesta;
  358.     return $this;
  359. }
  360. public function getFechaCierre(): ?\DateTimeInterface
  361. {
  362.     return $this->fechaCierre;
  363. }
  364. public function setFechaCierre(?\DateTimeInterface $fechaCierre): self
  365. {
  366.     $this->fechaCierre $fechaCierre;
  367.     return $this;
  368. }
  369. }