src/Entity/ParHabilidad.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ParHabilidadRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassParHabilidadRepository::class)]
  8. class ParHabilidad
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length100)]
  15.     private ?string $nombre null;
  16.     #[ORM\OneToMany(mappedBy'habilidad'targetEntityGHEntrevistaInfoSistemas::class)]
  17.     private Collection $habilidad;
  18.     #[ORM\ManyToOne(inversedBy'habilidad')]
  19.     private ?ParEstado $estado null;
  20.     #[ORM\OneToMany(mappedBy'nivelIngles'targetEntityTerPersona::class)]
  21.     private Collection $personaIngles;
  22.     public function __construct()
  23.     {
  24.         $this->habilidad = new ArrayCollection();
  25.         $this->evaluacionExperienciaId = new ArrayCollection();
  26.         $this->personaIngles = new ArrayCollection();
  27.     }
  28.     
  29.     public function __toString() {
  30.         return $this->getNombre();
  31.     }
  32.     public function getId(): ?int
  33.     {
  34.         return $this->id;
  35.     }
  36.     public function getNombre(): ?string
  37.     {
  38.         return $this->nombre;
  39.     }
  40.     public function setNombre(string $nombre): static
  41.     {
  42.         $this->nombre $nombre;
  43.         return $this;
  44.     }
  45.     /**
  46.      * @return Collection<int, GHEntrevistaInfoSistemas>
  47.      */
  48.     public function getHabilidad(): Collection
  49.     {
  50.         return $this->habilidad;
  51.     }
  52.     public function addHabilidad(GHEntrevistaInfoSistemas $habilidad): static
  53.     {
  54.         if (!$this->habilidad->contains($habilidad)) {
  55.             $this->habilidad->add($habilidad);
  56.             $habilidad->setHabilidad($this);
  57.         }
  58.         return $this;
  59.     }
  60.     public function removeHabilidad(GHEntrevistaInfoSistemas $habilidad): static
  61.     {
  62.         if ($this->habilidad->removeElement($habilidad)) {
  63.             // set the owning side to null (unless already changed)
  64.             if ($habilidad->getHabilidad() === $this) {
  65.                 $habilidad->setHabilidad(null);
  66.             }
  67.         }
  68.         return $this;
  69.     }
  70.     public function getEstado(): ?ParEstado
  71.     {
  72.         return $this->estado;
  73.     }
  74.     public function setEstado(?ParEstado $estado): static
  75.     {
  76.         $this->estado $estado;
  77.         return $this;
  78.     }
  79.     /**
  80.      * @return Collection<int, TerPersona>
  81.      */
  82.     public function getPersonaIngles(): Collection
  83.     {
  84.         return $this->personaIngles;
  85.     }
  86.     public function addPersonaIngle(TerPersona $personaIngle): static
  87.     {
  88.         if (!$this->personaIngles->contains($personaIngle)) {
  89.             $this->personaIngles->add($personaIngle);
  90.             $personaIngle->setNivelIngles($this);
  91.         }
  92.         return $this;
  93.     }
  94.     public function removePersonaIngle(TerPersona $personaIngle): static
  95.     {
  96.         if ($this->personaIngles->removeElement($personaIngle)) {
  97.             // set the owning side to null (unless already changed)
  98.             if ($personaIngle->getNivelIngles() === $this) {
  99.                 $personaIngle->setNivelIngles(null);
  100.             }
  101.         }
  102.         return $this;
  103.     }
  104. }