<?php
namespace App\Entity;
use App\Repository\TerAsociadoRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: TerAsociadoRepository::class)]
class TerAsociado
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $nombre = null;
#[ORM\OneToMany(mappedBy: 'asociado', targetEntity: JurDocumentoLegal::class)]
private Collection $documentoLegal;
#[ORM\Column(length: 255)]
private ?string $email = null;
#[ORM\OneToMany(mappedBy: 'asociadoNegocio', targetEntity: RFInventarioDocumentalComex::class)]
private Collection $inventarioDocumentalComex;
#[ORM\OneToMany(mappedBy: 'empresaAsociado', targetEntity: JurProceso::class)]
private Collection $procesoJuridico;
#[ORM\OneToMany(mappedBy: 'empresaAsociado', targetEntity: GHVacante::class)]
private Collection $vacante;
#[ORM\OneToMany(mappedBy: 'asociado', targetEntity: ComProspecto::class)]
private Collection $comTerAsociado;
#[ORM\OneToMany(mappedBy: 'asociado', targetEntity: TerEmpresaCliente::class)]
private Collection $terEmpresaClientes;
public function __construct()
{
$this->documentoLegal = new ArrayCollection();
$this->inventarioDocumentalComex = new ArrayCollection();
$this->procesoJuridico = new ArrayCollection();
$this->vacante = new ArrayCollection();
$this->comTerAsociado = new ArrayCollection();
$this->terEmpresaClientes = new ArrayCollection();
}
public function __toString() {
return $this->getNombre();
}
public function getId(): ?int
{
return $this->id;
}
public function getNombre(): ?string
{
return $this->nombre;
}
public function setNombre(string $nombre): static
{
$this->nombre = $nombre;
return $this;
}
/**
* @return Collection<int, JurDocumentoLegal>
*/
public function getDocumentoLegal(): Collection
{
return $this->documentoLegal;
}
public function addDocumentoLegal(JurDocumentoLegal $documentoLegal): static
{
if (!$this->documentoLegal->contains($documentoLegal)) {
$this->documentoLegal->add($documentoLegal);
$documentoLegal->setAsociado($this);
}
return $this;
}
public function removeDocumentoLegal(JurDocumentoLegal $documentoLegal): static
{
if ($this->documentoLegal->removeElement($documentoLegal)) {
// set the owning side to null (unless already changed)
if ($documentoLegal->getAsociado() === $this) {
$documentoLegal->setAsociado(null);
}
}
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): static
{
$this->email = $email;
return $this;
}
/**
* @return Collection<int, RFInventarioDocumentalComex>
*/
public function getInventarioDocumentalComex(): Collection
{
return $this->inventarioDocumentalComex;
}
public function addInventarioDocumentalComex(RFInventarioDocumentalComex $inventarioDocumentalComex): static
{
if (!$this->inventarioDocumentalComex->contains($inventarioDocumentalComex)) {
$this->inventarioDocumentalComex->add($inventarioDocumentalComex);
$inventarioDocumentalComex->setAsociadoNegocio($this);
}
return $this;
}
public function removeInventarioDocumentalComex(RFInventarioDocumentalComex $inventarioDocumentalComex): static
{
if ($this->inventarioDocumentalComex->removeElement($inventarioDocumentalComex)) {
// set the owning side to null (unless already changed)
if ($inventarioDocumentalComex->getAsociadoNegocio() === $this) {
$inventarioDocumentalComex->setAsociadoNegocio(null);
}
}
return $this;
}
/**
* @return Collection<int, JurProceso>
*/
public function getProcesoJuridico(): Collection
{
return $this->procesoJuridico;
}
public function addProcesoJuridico(JurProceso $procesoJuridico): static
{
if (!$this->procesoJuridico->contains($procesoJuridico)) {
$this->procesoJuridico->add($procesoJuridico);
$procesoJuridico->setEmpresaAsociado($this);
}
return $this;
}
public function removeProcesoJuridico(JurProceso $procesoJuridico): static
{
if ($this->procesoJuridico->removeElement($procesoJuridico)) {
// set the owning side to null (unless already changed)
if ($procesoJuridico->getEmpresaAsociado() === $this) {
$procesoJuridico->setEmpresaAsociado(null);
}
}
return $this;
}
/**
* @return Collection<int, GHVacante>
*/
public function getVacante(): Collection
{
return $this->vacante;
}
public function addVacante(GHVacante $vacante): static
{
if (!$this->vacante->contains($vacante)) {
$this->vacante->add($vacante);
$vacante->setEmpresaAsociado($this);
}
return $this;
}
public function removeVacante(GHVacante $vacante): static
{
if ($this->vacante->removeElement($vacante)) {
// set the owning side to null (unless already changed)
if ($vacante->getEmpresaAsociado() === $this) {
$vacante->setEmpresaAsociado(null);
}
}
return $this;
}
/**
* @return Collection<int, ComProspecto>
*/
public function getComTerAsociado(): Collection
{
return $this->comTerAsociado;
}
public function addComTerAsociado(ComProspecto $comTerAsociado): static
{
if (!$this->comTerAsociado->contains($comTerAsociado)) {
$this->comTerAsociado->add($comTerAsociado);
$comTerAsociado->setAsociado($this);
}
return $this;
}
public function removeComTerAsociado(ComProspecto $comTerAsociado): static
{
if ($this->comTerAsociado->removeElement($comTerAsociado)) {
// set the owning side to null (unless already changed)
if ($comTerAsociado->getAsociado() === $this) {
$comTerAsociado->setAsociado(null);
}
}
return $this;
}
/**
* @return Collection<int, TerEmpresaCliente>
*/
public function getTerEmpresaClientes(): Collection
{
return $this->terEmpresaClientes;
}
public function addTerEmpresaCliente(TerEmpresaCliente $terEmpresaCliente): static
{
if (!$this->terEmpresaClientes->contains($terEmpresaCliente)) {
$this->terEmpresaClientes->add($terEmpresaCliente);
$terEmpresaCliente->setAsociado($this);
}
return $this;
}
public function removeTerEmpresaCliente(TerEmpresaCliente $terEmpresaCliente): static
{
if ($this->terEmpresaClientes->removeElement($terEmpresaCliente)) {
// set the owning side to null (unless already changed)
if ($terEmpresaCliente->getAsociado() === $this) {
$terEmpresaCliente->setAsociado(null);
}
}
return $this;
}
}