src/Entity/Mantenimiento/Preventivo/PlanMantenimientoDiagramado.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Mantenimiento\Preventivo;
  3. use App\Repository\Mantenimiento\Preventivo\PlanMantenimientoDiagramadoRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use App\Entity\Equipos\Maquinaria as Equipo;
  9. use App\Entity\Mantenimiento\Departamento;
  10. /**
  11.  * @ORM\Entity(repositoryClass=PlanMantenimientoDiagramadoRepository::class)
  12.  */
  13. class PlanMantenimientoDiagramado
  14. {
  15.     /**
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue
  18.      * @ORM\Column(type="integer")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\Column(name="fecha_diagrama", type="date") 
  23.      */
  24.     private $fechaDiagrama;
  25.     /**
  26.      * @ORM\Column(name="fecha_realizacion", type="date", nullable=true)
  27.      */
  28.     private $fechaRealizacion;
  29.     /**
  30.      * @ORM\Column(name="fecha_proxima_realizacion", type="date", nullable=true)
  31.      */
  32.     private $fechaProximaRealizacion;
  33.     /**
  34.      * @ORM\Column(type="boolean")
  35.      */
  36.     private $realizado false;
  37.     /**
  38.      * @ORM\OneToMany(targetEntity=TareaPlanDiagramada::class, mappedBy="planMantenimientoDiagramado")
  39.      */
  40.     private $tareasDiagramadas;
  41.     /**
  42.      * @ORM\ManyToOne(targetEntity=Departamento::class)
  43.      * @ORM\JoinColumn(name="id_departamento", referencedColumnName="id")   
  44.      */
  45.     private $departamento;
  46.     /**
  47.      * @ORM\ManyToOne(targetEntity=PlanMantenimiento::class, inversedBy="planesDiagramados")
  48.      * @ORM\JoinColumn(name="id_plan", referencedColumnName="id")
  49.      */
  50.     private $planMantenimiento;
  51.     /**
  52.      * @ORM\ManyToOne(targetEntity=Equipo::class)
  53.      * @ORM\JoinColumn(name="id_equipo", referencedColumnName="id")
  54.      */ 
  55.     private $equipo;
  56.     public function __construct()
  57.     {
  58.         $this->tareasDiagramadas = new ArrayCollection();
  59.     }
  60.     public function getId(): ?int
  61.     {
  62.         return $this->id;
  63.     }
  64.     public function getFechaDiagrama(): ?\DateTimeInterface
  65.     {
  66.         return $this->fechaDiagrama;
  67.     }
  68.     public function setFechaDiagrama(\DateTimeInterface $fechaDiagrama): self
  69.     {
  70.         $this->fechaDiagrama $fechaDiagrama;
  71.         return $this;
  72.     }
  73.     public function getFechaRealizacion(): ?\DateTimeInterface
  74.     {
  75.         return $this->fechaRealizacion;
  76.     }
  77.     public function setFechaRealizacion(\DateTimeInterface $fechaRealizacion): self
  78.     {
  79.         $this->fechaRealizacion $fechaRealizacion;
  80.         return $this;
  81.     }
  82.     public function isRealizado(): ?bool
  83.     {
  84.         return $this->realizado;
  85.     }
  86.     public function setRealizado(bool $realizado): self
  87.     {
  88.         $this->realizado $realizado;
  89.         return $this;
  90.     }
  91.     public function getPlanMantenimiento(): ?PlanMantenimiento
  92.     {
  93.         return $this->planMantenimiento;
  94.     }
  95.     public function setPlanMantenimiento(?PlanMantenimiento $planMantenimiento): self
  96.     {
  97.         $this->planMantenimiento $planMantenimiento;
  98.         return $this;
  99.     }
  100.     public function getEquipo(): ?Equipo
  101.     {
  102.         return $this->equipo;
  103.     }
  104.     public function setEquipo(?Equipo $equipo): self
  105.     {
  106.         $this->equipo $equipo;
  107.         return $this;
  108.     }
  109.     public function getFechaProximaRealizacion(): ?\DateTimeInterface
  110.     {
  111.         return $this->fechaProximaRealizacion;
  112.     }
  113.     public function setFechaProximaRealizacion(?\DateTimeInterface $fechaProximaRealizacion): self
  114.     {
  115.         $this->fechaProximaRealizacion $fechaProximaRealizacion;
  116.         return $this;
  117.     }
  118.     public function getDepartamento(): ?Departamento
  119.     {
  120.         return $this->departamento;
  121.     }
  122.     public function setDepartamento(?Departamento $departamento): self
  123.     {
  124.         $this->departamento $departamento;
  125.         return $this;
  126.     }
  127.     /**
  128.      * @return Collection<int, TareaPlanDiagramada>
  129.      */
  130.     public function getTareasDiagramadas(): Collection
  131.     {
  132.         return $this->tareasDiagramadas;
  133.     }
  134.     public function addTareasDiagramada(TareaPlanDiagramada $tareasDiagramada): self
  135.     {
  136.         if (!$this->tareasDiagramadas->contains($tareasDiagramada)) {
  137.             $this->tareasDiagramadas[] = $tareasDiagramada;
  138.             $tareasDiagramada->setPlanMantenimientoDiagramado($this);
  139.         }
  140.         return $this;
  141.     }
  142.     public function removeTareasDiagramada(TareaPlanDiagramada $tareasDiagramada): self
  143.     {
  144.         if ($this->tareasDiagramadas->removeElement($tareasDiagramada)) {
  145.             // set the owning side to null (unless already changed)
  146.             if ($tareasDiagramada->getPlanMantenimientoDiagramado() === $this) {
  147.                 $tareasDiagramada->setPlanMantenimientoDiagramado(null);
  148.             }
  149.         }
  150.         return $this;
  151.     }
  152. }