<?phpnamespace App\Entity;use App\Repository\EstadoFacturaRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=EstadoFacturaRepository::class) */class EstadoFactura{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $nombre; /** * @ORM\Column(type="boolean", nullable=true) */ private $oculto; /** * @ORM\OneToMany(targetEntity=Factura::class, mappedBy="estado") */ private $facturas; /** * @ORM\OneToMany(targetEntity=FacturaGenerica::class, mappedBy="estado") */ private $facturasGenericas; public function __construct() { $this->facturas = new ArrayCollection(); $this->facturasGenericas = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getNombre(): ?string { return $this->nombre; } public function setNombre(string $nombre): self { $this->nombre = $nombre; return $this; } public function isOculto(): ?bool { return $this->oculto; } public function setOculto(?bool $oculto): self { $this->oculto = $oculto; return $this; } /** * @return Collection<int, Factura> */ public function getFacturas(): Collection { return $this->facturas; } public function addFactura(Factura $factura): self { if (!$this->facturas->contains($factura)) { $this->facturas[] = $factura; $factura->setEstado($this); } return $this; } public function removeFactura(Factura $factura): self { if ($this->facturas->removeElement($factura)) { // set the owning side to null (unless already changed) if ($factura->getEstado() === $this) { $factura->setEstado(null); } } return $this; } /** * @return Collection<int, FacturaGenerica> */ public function getFacturasGenericas(): Collection { return $this->facturasGenericas; } public function addFacturasGenerica(FacturaGenerica $facturasGenerica): self { if (!$this->facturasGenericas->contains($facturasGenerica)) { $this->facturasGenericas[] = $facturasGenerica; $facturasGenerica->setEstado($this); } return $this; } public function removeFacturasGenerica(FacturaGenerica $facturasGenerica): self { if ($this->facturasGenericas->removeElement($facturasGenerica)) { // set the owning side to null (unless already changed) if ($facturasGenerica->getEstado() === $this) { $facturasGenerica->setEstado(null); } } return $this; }}