<?php
namespace App\Entity;
use App\Repository\TarifaRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=TarifaRepository::class)
*/
class Tarifa
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=TipoTarifa::class, inversedBy="tarifas")
* @ORM\JoinColumn(nullable=false)
*/
private $tipoTarifa;
/**
* @ORM\Column(type="string", length=255)
*/
private $nombre;
/**
* @ORM\OneToMany(targetEntity=Producto::class, mappedBy="tarifa")
*/
private $productos;
/**
* @ORM\OneToMany(targetEntity=Factura::class, mappedBy="tarifa")
*/
private $facturas;
/**
* @ORM\OneToMany(targetEntity=ProductoProveedor::class, mappedBy="tarifa")
*/
private $productoProveedors;
/**
* @ORM\OneToMany(targetEntity=FacturaGenerica::class, mappedBy="tarifa")
*/
private $facturasGenericas;
/**
* @ORM\Column(type="boolean", nullable=false, options={"default": false})
*/
private $oculto;
/**
* @ORM\Column(type="boolean", nullable=false, options={"default": false})
*/
private $potenciaP1;
/**
* @ORM\Column(type="boolean", nullable=false, options={"default": false})
*/
private $potenciaP2;
/**
* @ORM\Column(type="boolean", nullable=false, options={"default": false})
*/
private $potenciaP3;
/**
* @ORM\Column(type="boolean", nullable=false, options={"default": false})
*/
private $potenciaP4;
/**
* @ORM\Column(type="boolean", nullable=false, options={"default": false})
*/
private $potenciaP5;
/**
* @ORM\Column(type="boolean", nullable=false, options={"default": false})
*/
private $potenciaP6;
/**
* @ORM\Column(type="boolean", nullable=false, options={"default": false})
*/
private $energiaP1;
/**
* @ORM\Column(type="boolean", nullable=false, options={"default": false})
*/
private $energiaP2;
/**
* @ORM\Column(type="boolean", nullable=false, options={"default": false})
*/
private $energiaP3;
/**
* @ORM\Column(type="boolean", nullable=false, options={"default": false})
*/
private $energiaP4;
/**
* @ORM\Column(type="boolean", nullable=false, options={"default": false})
*/
private $energiaP5;
/**
* @ORM\Column(type="boolean", nullable=false, options={"default": false})
*/
private $energiaP6;
/**
* @ORM\Column(type="boolean", nullable=false, options={"default": false})
*/
private $reactivaP1;
/**
* @ORM\Column(type="boolean", nullable=false, options={"default": false})
*/
private $reactivaP2;
/**
* @ORM\Column(type="boolean", nullable=false, options={"default": false})
*/
private $reactivaP3;
/**
* @ORM\Column(type="boolean", nullable=false, options={"default": false})
*/
private $reactivaP4;
/**
* @ORM\Column(type="boolean", nullable=false, options={"default": false})
*/
private $reactivaP5;
/**
* @ORM\Column(type="boolean", nullable=false, options={"default": false})
*/
private $reactivaP6;
/**
* @ORM\Column(type="boolean", nullable=false, options={"default": false})
*/
private $maximetro;
public function __construct()
{
$this->productos = new ArrayCollection();
$this->productoProveedors = new ArrayCollection();
$this->facturasGenericas = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getTipoTarifa(): ?TipoTarifa
{
return $this->tipoTarifa;
}
public function setTipoTarifa(?TipoTarifa $tipoTarifa): self
{
$this->tipoTarifa = $tipoTarifa;
return $this;
}
public function getNombre(): ?string
{
return $this->nombre;
}
public function setNombre(string $nombre): self
{
$this->nombre = $nombre;
return $this;
}
/**
* @return Collection|Producto[]
*/
public function getProductos(): Collection
{
return $this->productos;
}
public function addProducto(Producto $producto): self
{
if (!$this->productos->contains($producto)) {
$this->productos[] = $producto;
$producto->setTarifa($this);
}
return $this;
}
public function removeProducto(Producto $producto): self
{
if ($this->productos->contains($producto)) {
$this->productos->removeElement($producto);
// set the owning side to null (unless already changed)
if ($producto->getTarifa() === $this) {
$producto->setTarifa(null);
}
}
return $this;
}
public function __toString():?string
{
return $this->nombre;
}
/**
* @return Collection|Factura[]
*/
public function getFacturas(): Collection
{
return $this->facturas;
}
public function addFactura(Factura $factura): self
{
if (!$this->facturas->contains($factura)) {
$this->facturas[] = $factura;
$factura->setTarifa($this);
}
return $this;
}
public function removeFactura(Factura $factura): self
{
if ($this->facturas->contains($factura)) {
$this->facturas->removeElement($factura);
// set the owning side to null (unless already changed)
if ($factura->getTarifa() === $this) {
$factura->setTarifa(null);
}
}
return $this;
}
/**
* @return Collection|ProductoProveedor[]
*/
public function getProductoProveedors(): Collection
{
return $this->productoProveedors;
}
public function addProductoProveedor(ProductoProveedor $productoProveedor): self
{
if (!$this->productoProveedors->contains($productoProveedor)) {
$this->productoProveedors[] = $productoProveedor;
$productoProveedor->setTarifa($this);
}
return $this;
}
public function removeProductoProveedor(ProductoProveedor $productoProveedor): self
{
if ($this->productoProveedors->contains($productoProveedor)) {
$this->productoProveedors->removeElement($productoProveedor);
// set the owning side to null (unless already changed)
if ($productoProveedor->getTarifa() === $this) {
$productoProveedor->setTarifa(null);
}
}
return $this;
}
/**
* @return Collection|FacturaGenerica[]
*/
public function getFacturasGenericas(): Collection
{
return $this->facturasGenericas;
}
public function addFacturasGenerica(FacturaGenerica $facturasGenerica): self
{
if (!$this->facturasGenericas->contains($facturasGenerica)) {
$this->facturasGenericas[] = $facturasGenerica;
$facturasGenerica->setTarifa($this);
}
return $this;
}
public function removeFacturasGenerica(FacturaGenerica $facturasGenerica): self
{
if ($this->facturasGenericas->contains($facturasGenerica)) {
$this->facturasGenericas->removeElement($facturasGenerica);
// set the owning side to null (unless already changed)
if ($facturasGenerica->getTarifa() === $this) {
$facturasGenerica->setTarifa(null);
}
}
return $this;
}
public function getOculto(): ?bool
{
return $this->oculto;
}
public function setOculto(?bool $oculto): self
{
$this->oculto = $oculto;
return $this;
}
public function getPotenciaP1(): ?bool
{
return $this->potenciaP1;
}
public function setPotenciaP1(?bool $potenciaP1): self
{
$this->potenciaP1 = $potenciaP1;
return $this;
}
public function getPotenciaP2(): ?bool
{
return $this->potenciaP2;
}
public function setPotenciaP2(?bool $potenciaP2): self
{
$this->potenciaP2 = $potenciaP2;
return $this;
}
public function getPotenciaP3(): ?bool
{
return $this->potenciaP3;
}
public function setPotenciaP3(?bool $potenciaP3): self
{
$this->potenciaP3 = $potenciaP3;
return $this;
}
public function getPotenciaP4(): ?bool
{
return $this->potenciaP4;
}
public function setPotenciaP4(?bool $potenciaP4): self
{
$this->potenciaP4 = $potenciaP4;
return $this;
}
public function getPotenciaP5(): ?bool
{
return $this->potenciaP5;
}
public function setPotenciaP5(?bool $potenciaP5): self
{
$this->potenciaP5 = $potenciaP5;
return $this;
}
public function getPotenciaP6(): ?bool
{
return $this->potenciaP6;
}
public function setPotenciaP6(?bool $potenciaP6): self
{
$this->potenciaP6 = $potenciaP6;
return $this;
}
public function getEnergiaP1(): ?bool
{
return $this->energiaP1;
}
public function setEnergiaP1(?bool $energiaP1): self
{
$this->energiaP1 = $energiaP1;
return $this;
}
public function getEnergiaP2(): ?bool
{
return $this->energiaP2;
}
public function setEnergiaP2(?bool $energiaP2): self
{
$this->energiaP2 = $energiaP2;
return $this;
}
public function getEnergiaP3(): ?bool
{
return $this->energiaP3;
}
public function setEnergiaP3(?bool $energiaP3): self
{
$this->energiaP3 = $energiaP3;
return $this;
}
public function getEnergiaP4(): ?bool
{
return $this->energiaP4;
}
public function setEnergiaP4(?bool $energiaP4): self
{
$this->energiaP4 = $energiaP4;
return $this;
}
public function getEnergiaP5(): ?bool
{
return $this->energiaP5;
}
public function setEnergiaP5(?bool $energiaP5): self
{
$this->energiaP5 = $energiaP5;
return $this;
}
public function getEnergiaP6(): ?bool
{
return $this->energiaP6;
}
public function setEnergiaP6(?bool $energiaP6): self
{
$this->energiaP6 = $energiaP6;
return $this;
}
public function getReactivaP1(): ?bool
{
return $this->reactivaP1;
}
public function setReactivaP1(?bool $reactivaP1): self
{
$this->reactivaP1 = $reactivaP1;
return $this;
}
public function getReactivaP2(): ?bool
{
return $this->reactivaP2;
}
public function setReactivaP2(?bool $reactivaP2): self
{
$this->reactivaP2 = $reactivaP2;
return $this;
}
public function getReactivaP3(): ?bool
{
return $this->reactivaP3;
}
public function setReactivaP3(?bool $reactivaP3): self
{
$this->reactivaP3 = $reactivaP3;
return $this;
}
public function getReactivaP4(): ?bool
{
return $this->reactivaP4;
}
public function setReactivaP4(?bool $reactivaP4): self
{
$this->reactivaP4 = $reactivaP4;
return $this;
}
public function getReactivaP5(): ?bool
{
return $this->reactivaP5;
}
public function setReactivaP5(?bool $reactivaP5): self
{
$this->reactivaP5 = $reactivaP5;
return $this;
}
public function getReactivaP6(): ?bool
{
return $this->reactivaP6;
}
public function setReactivaP6(?bool $reactivaP6): self
{
$this->reactivaP6 = $reactivaP6;
return $this;
}
public function getMaximetro(): ?bool
{
return $this->maximetro;
}
public function setMaximetro(?bool $maximetro): self
{
$this->maximetro = $maximetro;
return $this;
}
}