<?php
namespace App\Entity;
use App\Repository\AdminRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: '`admin`')]
#[ORM\Entity(repositoryClass: AdminRepository::class)]
class Admin extends User
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\OneToMany(mappedBy: 'adminCargo', targetEntity: Empresa::class)]
private $empresas;
#[ORM\OneToMany(mappedBy: 'admin', targetEntity: SolicitarEmpresa::class)]
private $solicitarEmpresas;
// #[ORM\OneToMany(mappedBy: 'adminCargo', targetEntity: Cargo::class)]
// private $cargos;
#[ORM\OneToMany(mappedBy: 'adminCargo', targetEntity: Prestador::class)]
private $prestadors;
#[ORM\OneToMany(mappedBy: 'adminCargo', targetEntity: SubBeneficio::class)]
private $subBeneficios;
#[ORM\OneToMany(mappedBy: 'adminCargo', targetEntity: Beneficio::class)]
private $beneficios;
#[ORM\OneToMany(mappedBy: 'adminCargo', targetEntity: Proveedor::class)]
private $proveedors;
#[ORM\OneToMany(mappedBy: 'adminCargo', targetEntity: FacturaDeCompra::class)]
private $facturaDeCompras;
#[ORM\OneToMany(mappedBy: 'adminCargo', targetEntity: CompraStock::class)]
private $compraStocks;
#[ORM\OneToMany(mappedBy: 'adminCargo', targetEntity: EmpleadoBeneficio::class)]
private $empleadoBeneficios;
#[ORM\OneToMany(mappedBy: 'adminCargo', targetEntity: Concepto::class)]
private $conceptos;
#[ORM\OneToMany(mappedBy: 'adminCargo', targetEntity: MediosDePago::class)]
private $mediosDePagos;
#[ORM\OneToMany(mappedBy: 'adminPagoManual', targetEntity: Boleta::class)]
private $boleta;
#[ORM\OneToMany(mappedBy: 'adminEdito', targetEntity: EscalaSalarial::class)]
private $escalaSalarials;
#[ORM\OneToMany(mappedBy: 'adminCargo', targetEntity: MotivoLiquidacionEmpleado::class)]
private $motivoLiquidacionEmpleado;
#[ORM\OneToMany(mappedBy: 'adminCargo', targetEntity: AcuerdoDePago::class)]
private $acuerdoDePagos;
#[ORM\OneToMany(mappedBy: 'AdminCargo', targetEntity: PagosAcuerdo::class)]
private $pagosAcuerdos;
#[ORM\OneToMany(mappedBy: 'adminAprobo', targetEntity: InformarPago::class)]
private $informarPagos;
#[ORM\OneToMany(mappedBy: 'adminCargo', targetEntity: ItemDenuncia::class)]
private $itemDenuncias;
#[ORM\OneToMany(mappedBy: 'adminCargo', targetEntity: Denuncia::class)]
private $denuncias;
#[ORM\OneToMany(mappedBy: 'adminCargo', targetEntity: PagosBanco::class)]
private $pagosBancos;
#[ORM\OneToMany(mappedBy: 'adminCargo', targetEntity: CertificadoDeDeuda::class)]
private Collection $certificado;
#[ORM\OneToMany(mappedBy: 'adminCargo', targetEntity: EmpleadoRecibo::class)]
private Collection $empleadoRecibos;
public function __construct()
{
$this->empresas = new ArrayCollection();
$this->solicitarEmpresas = new ArrayCollection();
$this->prestadors = new ArrayCollection();
$this->subBeneficios = new ArrayCollection();
$this->beneficios = new ArrayCollection();
$this->proveedors = new ArrayCollection();
$this->facturaDeCompras = new ArrayCollection();
$this->compraStocks = new ArrayCollection();
$this->empleadoBeneficios = new ArrayCollection();
$this->conceptos = new ArrayCollection();
$this->mediosDePagos = new ArrayCollection();
$this->boleta = new ArrayCollection();
$this->escalaSalarials = new ArrayCollection();
$this->motivoLiquidacionEmpleado = new ArrayCollection();
$this->acuerdoDePagos = new ArrayCollection();
$this->acuerdoDePagos = new ArrayCollection();
$this->pagosAcuerdos = new ArrayCollection();
$this->informarPagos = new ArrayCollection();
$this->itemDenuncias = new ArrayCollection();
$this->denuncias = new ArrayCollection();
$this->pagosBancos = new ArrayCollection();
$this->certificado = new ArrayCollection();
$this->empleadoRecibos = new ArrayCollection();
}
/**
* @return Collection<int, Empresa>
*/
public function getEmpresas(): Collection
{
return $this->empresas;
}
public function addEmpresa(Empresa $empresa): self
{
if (!$this->empresas->contains($empresa)) {
$this->empresas[] = $empresa;
$empresa->setAdminCargo($this);
}
return $this;
}
public function removeEmpresa(Empresa $empresa): self
{
if ($this->empresas->removeElement($empresa)) {
// set the owning side to null (unless already changed)
if ($empresa->getAdminCargo() === $this) {
$empresa->setAdminCargo(null);
}
}
return $this;
}
/**
* @return Collection<int, SolicitarEmpresa>
*/
public function getSolicitarEmpresas(): Collection
{
return $this->solicitarEmpresas;
}
public function addSolicitarEmpresa(SolicitarEmpresa $solicitarEmpresa): self
{
if (!$this->solicitarEmpresas->contains($solicitarEmpresa)) {
$this->solicitarEmpresas[] = $solicitarEmpresa;
$solicitarEmpresa->setAdmin($this);
}
return $this;
}
public function removeSolicitarEmpresa(SolicitarEmpresa $solicitarEmpresa): self
{
if ($this->solicitarEmpresas->removeElement($solicitarEmpresa)) {
// set the owning side to null (unless already changed)
if ($solicitarEmpresa->getAdmin() === $this) {
$solicitarEmpresa->setAdmin(null);
}
}
return $this;
}
/**
* @return Collection<int, Prestador>
*/
public function getPrestadors(): Collection
{
return $this->prestadors;
}
public function addPrestador(Prestador $prestador): self
{
if (!$this->prestadors->contains($prestador)) {
$this->prestadors[] = $prestador;
$prestador->setAdminCargo($this);
}
return $this;
}
public function removePrestador(Prestador $prestador): self
{
if ($this->prestadors->removeElement($prestador)) {
// set the owning side to null (unless already changed)
if ($prestador->getAdminCargo() === $this) {
$prestador->setAdminCargo(null);
}
}
return $this;
}
/**
* @return Collection<int, SubBeneficio>
*/
public function getSubBeneficios(): Collection
{
return $this->subBeneficios;
}
public function addSubBeneficio(SubBeneficio $subBeneficio): self
{
if (!$this->subBeneficios->contains($subBeneficio)) {
$this->subBeneficios[] = $subBeneficio;
$subBeneficio->setAdminCargo($this);
}
return $this;
}
public function removeSubBeneficio(SubBeneficio $subBeneficio): self
{
if ($this->subBeneficios->removeElement($subBeneficio)) {
// set the owning side to null (unless already changed)
if ($subBeneficio->getAdminCargo() === $this) {
$subBeneficio->setAdminCargo(null);
}
}
return $this;
}
/**
* @return Collection<int, Beneficio>
*/
public function getBeneficios(): Collection
{
return $this->beneficios;
}
public function addBeneficio(Beneficio $beneficio): self
{
if (!$this->beneficios->contains($beneficio)) {
$this->beneficios[] = $beneficio;
$beneficio->setAdminCargo($this);
}
return $this;
}
public function removeBeneficio(Beneficio $beneficio): self
{
if ($this->beneficios->removeElement($beneficio)) {
// set the owning side to null (unless already changed)
if ($beneficio->getAdminCargo() === $this) {
$beneficio->setAdminCargo(null);
}
}
return $this;
}
/**
* @return Collection<int, Proveedor>
*/
public function getProveedors(): Collection
{
return $this->proveedors;
}
public function addProveedor(Proveedor $proveedor): self
{
if (!$this->proveedors->contains($proveedor)) {
$this->proveedors[] = $proveedor;
$proveedor->setAdminCargo($this);
}
return $this;
}
public function removeProveedor(Proveedor $proveedor): self
{
if ($this->proveedors->removeElement($proveedor)) {
// set the owning side to null (unless already changed)
if ($proveedor->getAdminCargo() === $this) {
$proveedor->setAdminCargo(null);
}
}
return $this;
}
/**
* @return Collection<int, FacturaDeCompra>
*/
public function getFacturaDeCompras(): Collection
{
return $this->facturaDeCompras;
}
public function addFacturaDeCompra(FacturaDeCompra $facturaDeCompra): self
{
if (!$this->facturaDeCompras->contains($facturaDeCompra)) {
$this->facturaDeCompras[] = $facturaDeCompra;
$facturaDeCompra->setAdminCargo($this);
}
return $this;
}
public function removeFacturaDeCompra(FacturaDeCompra $facturaDeCompra): self
{
if ($this->facturaDeCompras->removeElement($facturaDeCompra)) {
// set the owning side to null (unless already changed)
if ($facturaDeCompra->getAdminCargo() === $this) {
$facturaDeCompra->setAdminCargo(null);
}
}
return $this;
}
/**
* @return Collection<int, CompraStock>
*/
public function getCompraStocks(): Collection
{
return $this->compraStocks;
}
public function addCompraStock(CompraStock $compraStock): self
{
if (!$this->compraStocks->contains($compraStock)) {
$this->compraStocks[] = $compraStock;
$compraStock->setAdminCargo($this);
}
return $this;
}
public function removeCompraStock(CompraStock $compraStock): self
{
if ($this->compraStocks->removeElement($compraStock)) {
// set the owning side to null (unless already changed)
if ($compraStock->getAdminCargo() === $this) {
$compraStock->setAdminCargo(null);
}
}
return $this;
}
/**
* @return Collection<int, EmpleadoBeneficio>
*/
public function getEmpleadoBeneficios(): Collection
{
return $this->empleadoBeneficios;
}
public function addEmpleadoBeneficio(EmpleadoBeneficio $empleadoBeneficio): self
{
if (!$this->empleadoBeneficios->contains($empleadoBeneficio)) {
$this->empleadoBeneficios[] = $empleadoBeneficio;
$empleadoBeneficio->setAdminCargo($this);
}
return $this;
}
public function removeEmpleadoBeneficio(EmpleadoBeneficio $empleadoBeneficio): self
{
if ($this->empleadoBeneficios->removeElement($empleadoBeneficio)) {
// set the owning side to null (unless already changed)
if ($empleadoBeneficio->getAdminCargo() === $this) {
$empleadoBeneficio->setAdminCargo(null);
}
}
return $this;
}
/**
* @return Collection<int, Concepto>
*/
public function getConceptos(): Collection
{
return $this->conceptos;
}
public function addConcepto(Concepto $concepto): self
{
if (!$this->conceptos->contains($concepto)) {
$this->conceptos[] = $concepto;
$concepto->setAdminCargo($this);
}
return $this;
}
public function removeConcepto(Concepto $concepto): self
{
if ($this->conceptos->removeElement($concepto)) {
// set the owning side to null (unless already changed)
if ($concepto->getAdminCargo() === $this) {
$concepto->setAdminCargo(null);
}
}
return $this;
}
/**
* @return Collection<int, MediosDePago>
*/
public function getMediosDePagos(): Collection
{
return $this->mediosDePagos;
}
public function addMediosDePago(MediosDePago $mediosDePago): self
{
if (!$this->mediosDePagos->contains($mediosDePago)) {
$this->mediosDePagos[] = $mediosDePago;
$mediosDePago->setAdminCargo($this);
}
return $this;
}
public function removeMediosDePago(MediosDePago $mediosDePago): self
{
if ($this->mediosDePagos->removeElement($mediosDePago)) {
// set the owning side to null (unless already changed)
if ($mediosDePago->getAdminCargo() === $this) {
$mediosDePago->setAdminCargo(null);
}
}
return $this;
}
/**
* @return Collection<int, Boleta>
*/
public function getBoleta(): Collection
{
return $this->boleta;
}
public function addBoleta(Boleta $boleta): self
{
if (!$this->boleta->contains($boleta)) {
$this->boleta[] = $boleta;
$boleta->setAdminPagoManual($this);
}
return $this;
}
public function removeBoleta(Boleta $boleta): self
{
if ($this->boleta->removeElement($boleta)) {
// set the owning side to null (unless already changed)
if ($boleta->getAdminPagoManual() === $this) {
$boleta->setAdminPagoManual(null);
}
}
return $this;
}
/**
* @return Collection<int, EscalaSalarial>
*/
public function getEscalaSalarials(): Collection
{
return $this->escalaSalarials;
}
public function addEscalaSalarial(EscalaSalarial $escalaSalarial): self
{
if (!$this->escalaSalarials->contains($escalaSalarial)) {
$this->escalaSalarials[] = $escalaSalarial;
$escalaSalarial->setAdminEdito($this);
}
return $this;
}
public function removeEscalaSalarial(EscalaSalarial $escalaSalarial): self
{
if ($this->escalaSalarials->removeElement($escalaSalarial)) {
// set the owning side to null (unless already changed)
if ($escalaSalarial->getAdminEdito() === $this) {
$escalaSalarial->setAdminEdito(null);
}
}
return $this;
}
/**
* @return Collection<int, MotivoLiquidacionEmpleado>
*/
public function getMotivoLiquidacionEmpleado(): Collection
{
return $this->motivoLiquidacionEmpleado;
}
public function addMotivoLiquidacionEmpleado(MotivoLiquidacionEmpleado $motivoLiquidacionEmpleado): self
{
if (!$this->motivoLiquidacionEmpleado->contains($motivoLiquidacionEmpleado)) {
$this->motivoLiquidacionEmpleado[] = $motivoLiquidacionEmpleado;
$motivoLiquidacionEmpleado->setAdminCargo($this);
}
return $this;
}
public function removeMotivoLiquidacionEmpleado(MotivoLiquidacionEmpleado $motivoLiquidacionEmpleado): self
{
if ($this->motivoLiquidacionEmpleado->removeElement($motivoLiquidacionEmpleado)) {
// set the owning side to null (unless already changed)
if ($motivoLiquidacionEmpleado->getAdminCargo() === $this) {
$motivoLiquidacionEmpleado->setAdminCargo(null);
}
}
return $this;
}
/**
* @return Collection<int, AcuerdoDePago>
*/
public function getAcuerdoDePagos(): Collection
{
return $this->acuerdoDePagos;
}
public function addAcuerdoDePago(AcuerdoDePago $acuerdoDePago): self
{
if (!$this->acuerdoDePagos->contains($acuerdoDePago)) {
$this->acuerdoDePagos[] = $acuerdoDePago;
$acuerdoDePago->setAdminCargo($this);
}
return $this;
}
public function removeAcuerdoDePago(AcuerdoDePago $acuerdoDePago): self
{
if ($this->acuerdoDePagos->removeElement($acuerdoDePago)) {
// set the owning side to null (unless already changed)
if ($acuerdoDePago->getAdminCargo() === $this) {
$acuerdoDePago->setAdminCargo(null);
}
}
return $this;
}
/**
* @return Collection<int, PagosAcuerdo>
*/
public function getPagosAcuerdos(): Collection
{
return $this->pagosAcuerdos;
}
public function addPagosAcuerdo(PagosAcuerdo $pagosAcuerdo): self
{
if (!$this->pagosAcuerdos->contains($pagosAcuerdo)) {
$this->pagosAcuerdos[] = $pagosAcuerdo;
$pagosAcuerdo->setAdminCargo($this);
}
return $this;
}
public function removePagosAcuerdo(PagosAcuerdo $pagosAcuerdo): self
{
if ($this->pagosAcuerdos->removeElement($pagosAcuerdo)) {
// set the owning side to null (unless already changed)
if ($pagosAcuerdo->getAdminCargo() === $this) {
$pagosAcuerdo->setAdminCargo(null);
}
}
return $this;
}
/**
* @return Collection<int, InformarPago>
*/
public function getInformarPagos(): Collection
{
return $this->informarPagos;
}
public function addInformarPago(InformarPago $informarPago): self
{
if (!$this->informarPagos->contains($informarPago)) {
$this->informarPagos[] = $informarPago;
$informarPago->setAdminAprobo($this);
}
return $this;
}
public function removeInformarPago(InformarPago $informarPago): self
{
if ($this->informarPagos->removeElement($informarPago)) {
// set the owning side to null (unless already changed)
if ($informarPago->getAdminAprobo() === $this) {
$informarPago->setAdminAprobo(null);
}
}
return $this;
}
/**
* @return Collection<int, ItemDenuncia>
*/
public function getItemDenuncias(): Collection
{
return $this->itemDenuncias;
}
public function addItemDenuncia(ItemDenuncia $itemDenuncia): self
{
if (!$this->itemDenuncias->contains($itemDenuncia)) {
$this->itemDenuncias[] = $itemDenuncia;
$itemDenuncia->setAdminCargo($this);
}
return $this;
}
public function removeItemDenuncia(ItemDenuncia $itemDenuncia): self
{
if ($this->itemDenuncias->removeElement($itemDenuncia)) {
// set the owning side to null (unless already changed)
if ($itemDenuncia->getAdminCargo() === $this) {
$itemDenuncia->setAdminCargo(null);
}
}
return $this;
}
/**
* @return Collection<int, Denuncia>
*/
public function getDenuncias(): Collection
{
return $this->denuncias;
}
public function addDenuncia(Denuncia $denuncia): self
{
if (!$this->denuncias->contains($denuncia)) {
$this->denuncias[] = $denuncia;
$denuncia->setAdminCargo($this);
}
return $this;
}
public function removeDenuncia(Denuncia $denuncia): self
{
if ($this->denuncias->removeElement($denuncia)) {
// set the owning side to null (unless already changed)
if ($denuncia->getAdminCargo() === $this) {
$denuncia->setAdminCargo(null);
}
}
return $this;
}
/**
* @return Collection<int, PagosBanco>
*/
public function getPagosBancos(): Collection
{
return $this->pagosBancos;
}
public function addPagosBanco(PagosBanco $pagosBanco): self
{
if (!$this->pagosBancos->contains($pagosBanco)) {
$this->pagosBancos[] = $pagosBanco;
$pagosBanco->setAdminCargo($this);
}
return $this;
}
public function removePagosBanco(PagosBanco $pagosBanco): self
{
if ($this->pagosBancos->removeElement($pagosBanco)) {
// set the owning side to null (unless already changed)
if ($pagosBanco->getAdminCargo() === $this) {
$pagosBanco->setAdminCargo(null);
}
}
return $this;
}
/**
* @return Collection<int, CertificadoDeDeuda>
*/
public function getCertificado(): Collection
{
return $this->certificado;
}
public function addCertificado(CertificadoDeDeuda $certificado): self
{
if (!$this->certificado->contains($certificado)) {
$this->certificado->add($certificado);
$certificado->setAdminCargo($this);
}
return $this;
}
public function removeCertificado(CertificadoDeDeuda $certificado): self
{
if ($this->certificado->removeElement($certificado)) {
// set the owning side to null (unless already changed)
if ($certificado->getAdminCargo() === $this) {
$certificado->setAdminCargo(null);
}
}
return $this;
}
/**
* @return Collection<int, EmpleadoRecibo>
*/
public function getEmpleadoRecibos(): Collection
{
return $this->empleadoRecibos;
}
public function addEmpleadoRecibo(EmpleadoRecibo $empleadoRecibo): self
{
if (!$this->empleadoRecibos->contains($empleadoRecibo)) {
$this->empleadoRecibos->add($empleadoRecibo);
$empleadoRecibo->setAdminCargo($this);
}
return $this;
}
public function removeEmpleadoRecibo(EmpleadoRecibo $empleadoRecibo): self
{
if ($this->empleadoRecibos->removeElement($empleadoRecibo)) {
// set the owning side to null (unless already changed)
if ($empleadoRecibo->getAdminCargo() === $this) {
$empleadoRecibo->setAdminCargo(null);
}
}
return $this;
}
}