src/Entity/Fraccionamiento.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\FraccionamientoRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=FraccionamientoRepository::class)
  9.  */
  10. class Fraccionamiento
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToMany(targetEntity=Factura::class, inversedBy="fraccionamientos")
  20.      */
  21.     private $facturas;
  22.     /**
  23.      * @ORM\ManyToMany(targetEntity=FacturaGenerica::class, inversedBy="fraccionamientos")
  24.      */
  25.     private $facturasGenericas;
  26.     /**
  27.      * @ORM\Column(type="integer", nullable=true)
  28.      */
  29.     private $plazos;
  30.     /**
  31.      * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  32.      */
  33.     private $importeTotal;
  34.     /**
  35.      * @ORM\OneToMany(targetEntity=Concepto::class, mappedBy="fraccionamiento")
  36.      */
  37.     private $otrosConceptos;
  38.     /**
  39.      * @ORM\ManyToOne(targetEntity=Cliente::class, inversedBy="fraccionamientos")
  40.      */
  41.     private $cliente;
  42.     /**
  43.      * @ORM\OneToMany(targetEntity=PagoFraccionamiento::class, mappedBy="fraccionamiento", orphanRemoval=true)
  44.      */
  45.     private $pagos;
  46.     /**
  47.      * @ORM\Column(type="datetime", nullable=true)
  48.      */
  49.     private $fechaCreacion;
  50.     /**
  51.      * @ORM\Column(type="string", length=255, nullable=true)
  52.      */
  53.     private $estado;
  54.     /**
  55.      * @ORM\Column(type="datetime", nullable=true)
  56.      */
  57.     private $fechaPago;
  58.     /**
  59.      * @ORM\Column(type="dateinterval", nullable=true)
  60.      */
  61.     private $periodo;
  62.     public function __construct()
  63.     {
  64.         $this->facturas = new ArrayCollection();
  65.         $this->facturasGenericas = new ArrayCollection();
  66.         $this->otrosConceptos = new ArrayCollection();
  67.         $this->pagos = new ArrayCollection();
  68.     }
  69.     public function getId(): ?int
  70.     {
  71.         return $this->id;
  72.     }
  73.     /**
  74.      * @return Collection<int, Factura>
  75.      */
  76.     public function getFacturas(): Collection
  77.     {
  78.         return $this->facturas;
  79.     }
  80.     public function addFactura(Factura $factura): self
  81.     {
  82.         if (!$this->facturas->contains($factura)) {
  83.             $this->facturas[] = $factura;
  84.         }
  85.         return $this;
  86.     }
  87.     public function removeFactura(Factura $factura): self
  88.     {
  89.         $this->facturas->removeElement($factura);
  90.         return $this;
  91.     }
  92.     /**
  93.      * @return Collection<int, FacturaGenerica>
  94.      */
  95.     public function getFacturasGenericas(): Collection
  96.     {
  97.         return $this->facturasGenericas;
  98.     }
  99.     public function addFacturasGenerica(FacturaGenerica $facturasGenerica): self
  100.     {
  101.         if (!$this->facturasGenericas->contains($facturasGenerica)) {
  102.             $this->facturasGenericas[] = $facturasGenerica;
  103.         }
  104.         return $this;
  105.     }
  106.     public function removeFacturasGenerica(FacturaGenerica $facturasGenerica): self
  107.     {
  108.         $this->facturasGenericas->removeElement($facturasGenerica);
  109.         return $this;
  110.     }
  111.     public function getPlazos(): ?int
  112.     {
  113.         return $this->plazos;
  114.     }
  115.     public function setPlazos(?int $plazos): self
  116.     {
  117.         $this->plazos $plazos;
  118.         return $this;
  119.     }
  120.     public function getImporteTotal(): ?string
  121.     {
  122.         return $this->importeTotal;
  123.     }
  124.     public function setImporteTotal(?string $importeTotal): self
  125.     {
  126.         $this->importeTotal $importeTotal;
  127.         return $this;
  128.     }
  129.     /**
  130.      * @return Collection<int, Concepto>
  131.      */
  132.     public function getOtrosConceptos(): Collection
  133.     {
  134.         return $this->otrosConceptos;
  135.     }
  136.     public function addOtrosConcepto(Concepto $otrosConcepto): self
  137.     {
  138.         if (!$this->otrosConceptos->contains($otrosConcepto)) {
  139.             $this->otrosConceptos[] = $otrosConcepto;
  140.             $otrosConcepto->setFraccionamiento($this);
  141.         }
  142.         return $this;
  143.     }
  144.     public function removeOtrosConcepto(Concepto $otrosConcepto): self
  145.     {
  146.         if ($this->otrosConceptos->removeElement($otrosConcepto)) {
  147.             // set the owning side to null (unless already changed)
  148.             if ($otrosConcepto->getFraccionamiento() === $this) {
  149.                 $otrosConcepto->setFraccionamiento(null);
  150.             }
  151.         }
  152.         return $this;
  153.     }
  154.     public function getCliente(): ?Cliente
  155.     {
  156.         return $this->cliente;
  157.     }
  158.     public function setCliente(?Cliente $cliente): self
  159.     {
  160.         $this->cliente $cliente;
  161.         return $this;
  162.     }
  163.     /**
  164.      * @return Collection<int, PagoFraccionamiento>
  165.      */
  166.     public function getPagos(): Collection
  167.     {
  168.         return $this->pagos;
  169.     }
  170.     public function addPago(PagoFraccionamiento $pago): self
  171.     {
  172.         if (!$this->pagos->contains($pago)) {
  173.             $this->pagos[] = $pago;
  174.             $pago->setFraccionamiento($this);
  175.         }
  176.         return $this;
  177.     }
  178.     public function removePago(PagoFraccionamiento $pago): self
  179.     {
  180.         if ($this->pagos->removeElement($pago)) {
  181.             // set the owning side to null (unless already changed)
  182.             if ($pago->getFraccionamiento() === $this) {
  183.                 $pago->setFraccionamiento(null);
  184.             }
  185.         }
  186.         return $this;
  187.     }
  188.     public function getFechaCreacion(): ?\DateTimeInterface
  189.     {
  190.         return $this->fechaCreacion;
  191.     }
  192.     public function setFechaCreacion(?\DateTimeInterface $fechaCreacion): self
  193.     {
  194.         $this->fechaCreacion $fechaCreacion;
  195.         return $this;
  196.     }
  197.     public function getEstado(): ?string
  198.     {
  199.         return $this->estado;
  200.     }
  201.     public function setEstado(?string $estado): self
  202.     {
  203.         $this->estado $estado;
  204.         return $this;
  205.     }
  206.     public function getFechaPago(): ?\DateTimeInterface
  207.     {
  208.         return $this->fechaPago;
  209.     }
  210.     public function setFechaPago(?\DateTimeInterface $fechaPago): self
  211.     {
  212.         $this->fechaPago $fechaPago;
  213.         return $this;
  214.     }
  215.     public function getPeriodo(): ?\DateInterval
  216.     {
  217.         return $this->periodo;
  218.     }
  219.     public function setPeriodo(?\DateInterval $periodo): self
  220.     {
  221.         $this->periodo $periodo;
  222.         return $this;
  223.     }
  224. }