src/Entity/ParNivelEducativo.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ParNivelEducativoRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassParNivelEducativoRepository::class)]
  8. class ParNivelEducativo
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255)]
  15.     private ?string $nivelEducativo null;
  16.     #[ORM\OneToMany(mappedBy'nivelEducativo'targetEntityGHEntrevistaInfoAcademica::class)]
  17.     private Collection $entrevistaInfoAcademica;
  18.     #[ORM\OneToMany(mappedBy'nivelEducativo'targetEntityTerPersona::class)]
  19.     private Collection $persona;
  20.     #[ORM\OneToMany(mappedBy'nivelEducativo'targetEntityTerContactoPersona::class)]
  21.     private Collection $contactoPersona;
  22.     #[ORM\ManyToMany(targetEntityGHPerfilCargo::class, mappedBy'ParNivelEducativo')]
  23.     private Collection $idPerfilCargo;
  24.     public function __construct()
  25.     {
  26.         $this->idEntrevistaInfoAcademica = new ArrayCollection();
  27.         $this->persona = new ArrayCollection();
  28.         $this->contactoPersona = new ArrayCollection();
  29.         $this->idPerfilCargo = new ArrayCollection();
  30.     }
  31.     
  32.     public function __toString() {
  33.         return $this->getNivelEducativo();
  34.     }
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function getNivelEducativo(): ?string
  40.     {
  41.         return $this->nivelEducativo;
  42.     }
  43.     public function setNivelEducativo(string $nivelEducativo): static
  44.     {
  45.         $this->nivelEducativo $nivelEducativo;
  46.         return $this;
  47.     }
  48.    
  49.     /**
  50.      * @return Collection<int, GHEntrevistaInfoAcademica>
  51.      */
  52.     public function getEntrevistaInfoAcademica(): Collection
  53.     {
  54.         return $this->entrevistaInfoAcademica;
  55.     }
  56.     public function addIdEntrevistaInfoAcademica(GHEntrevistaInfoAcademica $entrevistaInfoAcademica): static
  57.     {
  58.         if (!$this->entrevistaInfoAcademica->contains($entrevistaInfoAcademica)) {
  59.             $this->entrevistaInfoAcademica->add($entrevistaInfoAcademica);
  60.             $entrevistaInfoAcademica->setNivelEducativo($this);
  61.         }
  62.         return $this;
  63.     }
  64.     public function removeEntrevistaInfoAcademica(GHEntrevistaInfoAcademica $entrevistaInfoAcademica): static
  65.     {
  66.         if ($this->entrevistaInfoAcademica->removeElement($entrevistaInfoAcademica)) {
  67.             // set the owning side to null (unless already changed)
  68.             if ($entrevistaInfoAcademica->getNivelEducativo() === $this) {
  69.                 $entrevistaInfoAcademica->setNivelEducativo(null);
  70.             }
  71.         }
  72.         return $this;
  73.     }
  74.     /**
  75.      * @return Collection<int, TerPersona>
  76.      */
  77.     public function getPersona(): Collection
  78.     {
  79.         return $this->persona;
  80.     }
  81.     public function addPersona(TerPersona $persona): static
  82.     {
  83.         if (!$this->persona->contains($persona)) {
  84.             $this->persona->add($persona);
  85.             $persona->setNivelEducativo($this);
  86.         }
  87.         return $this;
  88.     }
  89.     public function removePersona(TerPersona $persona): static
  90.     {
  91.         if ($this->persona->removeElement($persona)) {
  92.             // set the owning side to null (unless already changed)
  93.             if ($persona->getNivelEducativo() === $this) {
  94.                 $persona->setNivelEducativo(null);
  95.             }
  96.         }
  97.         return $this;
  98.     }
  99.     /**
  100.      * @return Collection<int, TerContactoPersona>
  101.      */
  102.     public function getContactoPersona(): Collection
  103.     {
  104.         return $this->contactoPersona;
  105.     }
  106.     public function addContactoPersona(TerContactoPersona $contactoPersona): static
  107.     {
  108.         if (!$this->contactoPersona->contains($contactoPersona)) {
  109.             $this->contactoPersona->add($contactoPersona);
  110.             $contactoPersona->setNivelEducativo($this);
  111.         }
  112.         return $this;
  113.     }
  114.     public function removeContactoPersona(TerContactoPersona $contactoPersona): static
  115.     {
  116.         if ($this->contactoPersona->removeElement($contactoPersona)) {
  117.             // set the owning side to null (unless already changed)
  118.             if ($contactoPersona->getNivelEducativo() === $this) {
  119.                 $contactoPersona->setNivelEducativo(null);
  120.             }
  121.         }
  122.         return $this;
  123.     }
  124.     /**
  125.      * @return Collection<int, GHPerfilCargo>
  126.      */
  127.     public function getIdPerfilCargo(): Collection
  128.     {
  129.         return $this->idPerfilCargo;
  130.     }
  131.     public function addIdPerfilCargo(GHPerfilCargo $idPerfilCargo): static
  132.     {
  133.         if (!$this->idPerfilCargo->contains($idPerfilCargo)) {
  134.             $this->idPerfilCargo->add($idPerfilCargo);
  135.             $idPerfilCargo->addParNivelEducativo($this);
  136.         }
  137.         return $this;
  138.     }
  139.     public function removeIdPerfilCargo(GHPerfilCargo $idPerfilCargo): static
  140.     {
  141.         if ($this->idPerfilCargo->removeElement($idPerfilCargo)) {
  142.             $idPerfilCargo->removeParNivelEducativo($this);
  143.         }
  144.         return $this;
  145.     }
  146. }