src/Entity/ParTipoDocumento.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ParTipoDocumentoRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassParTipoDocumentoRepository::class)]
  8. class ParTipoDocumento
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\OneToMany(mappedBy'tipoDocumento'targetEntityGHCandidato::class)]
  15.     private Collection $candidato;
  16.     #[ORM\Column(length100)]
  17.     private ?string $nombre null;
  18.     #[ORM\OneToMany(mappedBy'tipoDocumento'targetEntityTerPersona::class)]
  19.     private Collection $persona;
  20.     #[ORM\OneToMany(mappedBy'tipoDocumento'targetEntityGHNovedadNomina::class)]
  21.     private Collection $novedadNomina;
  22.     #[ORM\OneToMany(mappedBy'tipoDocumento'targetEntitySegVisitante::class)]
  23.     private Collection $visitante;
  24.     #[ORM\OneToMany(mappedBy'tipoId'targetEntityComProspecto::class)]
  25.     private Collection $comTipoDocumentos;
  26.     #[ORM\OneToMany(mappedBy'tipoId'targetEntityTerEmpresaCliente::class)]
  27.     private Collection $terEmpresaClientes;
  28.     public function __construct()
  29.     {
  30.         $this->candidato = new ArrayCollection();
  31.         $this->persona = new ArrayCollection();
  32.         $this->novedadNomina = new ArrayCollection();
  33.         $this->visitante = new ArrayCollection();
  34.         $this->comTipoDocumentos = new ArrayCollection();
  35.         $this->terEmpresaClientes = new ArrayCollection();
  36.     }
  37.     
  38.     public function __toString() {
  39.         return $this->getNombre();
  40.     }
  41.     public function getId(): ?int
  42.     {
  43.         return $this->id;
  44.     }
  45.     /**
  46.      * @return Collection<int, GHCandidato>
  47.      */
  48.     public function getCandidato(): Collection
  49.     {
  50.         return $this->candidato;
  51.     }
  52.     public function addCandidato(GHCandidato $idCandidato): static
  53.     {
  54.         if (!$this->candidato->contains($idCandidato)) {
  55.             $this->candidato->add($idCandidato);
  56.             $idCandidato->setTipoDocumentoId($this);
  57.         }
  58.         return $this;
  59.     }
  60.     public function removeIdCandidato(GHCandidato $idCandidato): static
  61.     {
  62.         if ($this->candidato->removeElement($idCandidato)) {
  63.             // set the owning side to null (unless already changed)
  64.             if ($idCandidato->getTipoDocumentoId() === $this) {
  65.                 $idCandidato->setTipoDocumentoId(null);
  66.             }
  67.         }
  68.         return $this;
  69.     }
  70.     public function getNombre(): ?string
  71.     {
  72.         return $this->nombre;
  73.     }
  74.     public function setNombre(string $nombre): static
  75.     {
  76.         $this->nombre $nombre;
  77.         return $this;
  78.     }
  79.     /**
  80.      * @return Collection<int, TerPersona>
  81.      */
  82.     public function getPersona(): Collection
  83.     {
  84.         return $this->persona;
  85.     }
  86.     public function addPersona(TerPersona $persona): static
  87.     {
  88.         if (!$this->persona->contains($persona)) {
  89.             $this->persona->add($persona);
  90.             $persona->setTipoDocumento($this);
  91.         }
  92.         return $this;
  93.     }
  94.     public function removePersona(TerPersona $persona): static
  95.     {
  96.         if ($this->persona->removeElement($persona)) {
  97.             // set the owning side to null (unless already changed)
  98.             if ($persona->getTipoDocumento() === $this) {
  99.                 $persona->setTipoDocumento(null);
  100.             }
  101.         }
  102.         return $this;
  103.     }
  104.     /**
  105.      * @return Collection<int, GHNovedadNomina>
  106.      */
  107.     public function getNovedadNomina(): Collection
  108.     {
  109.         return $this->novedadNomina;
  110.     }
  111.     public function addNovedadNomina(GHNovedadNomina $novedadNomina): static
  112.     {
  113.         if (!$this->novedadNomina->contains($novedadNomina)) {
  114.             $this->novedadNomina->add($novedadNomina);
  115.             $novedadNomina->setTipoDocumento($this);
  116.         }
  117.         return $this;
  118.     }
  119.     public function removeNovedadNomina(GHNovedadNomina $novedadNomina): static
  120.     {
  121.         if ($this->novedadNomina->removeElement($novedadNomina)) {
  122.             // set the owning side to null (unless already changed)
  123.             if ($novedadNomina->getTipoDocumento() === $this) {
  124.                 $novedadNomina->setTipoDocumento(null);
  125.             }
  126.         }
  127.         return $this;
  128.     }
  129.     /**
  130.      * @return Collection<int, SegVisitante>
  131.      */
  132.     public function getVisitante(): Collection
  133.     {
  134.         return $this->visitante;
  135.     }
  136.     public function addVisitante(SegVisitante $visitante): static
  137.     {
  138.         if (!$this->visitante->contains($visitante)) {
  139.             $this->visitante->add($visitante);
  140.             $visitante->setTipoDocumento($this);
  141.         }
  142.         return $this;
  143.     }
  144.     public function removeVisitante(SegVisitante $visitante): static
  145.     {
  146.         if ($this->visitante->removeElement($visitante)) {
  147.             // set the owning side to null (unless already changed)
  148.             if ($visitante->getTipoDocumento() === $this) {
  149.                 $visitante->setTipoDocumento(null);
  150.             }
  151.         }
  152.         return $this;
  153.     }
  154.     /**
  155.      * @return Collection<int, ComProspecto>
  156.      */
  157.     public function getComTipoDocumentos(): Collection
  158.     {
  159.         return $this->comTipoDocumentos;
  160.     }
  161.     public function addComTipoDocumento(ComProspecto $comTipoDocumento): static
  162.     {
  163.         if (!$this->comTipoDocumentos->contains($comTipoDocumento)) {
  164.             $this->comTipoDocumentos->add($comTipoDocumento);
  165.             $comTipoDocumento->setTipoId($this);
  166.         }
  167.         return $this;
  168.     }
  169.     public function removeComTipoDocumento(ComProspecto $comTipoDocumento): static
  170.     {
  171.         if ($this->comTipoDocumentos->removeElement($comTipoDocumento)) {
  172.             // set the owning side to null (unless already changed)
  173.             if ($comTipoDocumento->getTipoId() === $this) {
  174.                 $comTipoDocumento->setTipoId(null);
  175.             }
  176.         }
  177.         return $this;
  178.     }
  179.     /**
  180.      * @return Collection<int, TerEmpresaCliente>
  181.      */
  182.     public function getTerEmpresaClientes(): Collection
  183.     {
  184.         return $this->terEmpresaClientes;
  185.     }
  186.     public function addTerEmpresaCliente(TerEmpresaCliente $terEmpresaCliente): static
  187.     {
  188.         if (!$this->terEmpresaClientes->contains($terEmpresaCliente)) {
  189.             $this->terEmpresaClientes->add($terEmpresaCliente);
  190.             $terEmpresaCliente->setTipoId($this);
  191.         }
  192.         return $this;
  193.     }
  194.     public function removeTerEmpresaCliente(TerEmpresaCliente $terEmpresaCliente): static
  195.     {
  196.         if ($this->terEmpresaClientes->removeElement($terEmpresaCliente)) {
  197.             // set the owning side to null (unless already changed)
  198.             if ($terEmpresaCliente->getTipoId() === $this) {
  199.                 $terEmpresaCliente->setTipoId(null);
  200.             }
  201.         }
  202.         return $this;
  203.     }
  204. }