src/Entity/ParMotivoDesvinculacion.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ParMotivoDesvinculacionRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassParMotivoDesvinculacionRepository::class)]
  8. class ParMotivoDesvinculacion
  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\ManyToOne(inversedBy'motivoDesvinculacion')]
  17.     private ?ParEstado $estado null;
  18.     #[ORM\OneToMany(mappedBy'motivoDesvinculacion'targetEntityGHDesvinculacion::class)]
  19.     private Collection $desvinculacion;
  20.     #[ORM\OneToMany(mappedBy'motivoRetiro'targetEntityGHEntrevistaInfoLaboral::class)]
  21.     private Collection $entrevistasInfoLaboral;
  22.     public function __construct()
  23.     {
  24.         $this->desvinculacion = new ArrayCollection();
  25.         $this->entrevistasInfoLaboral = new ArrayCollection();
  26.     }
  27.     public function __toString() {
  28.         return $this->getNombre();
  29.     }
  30.     
  31.     public function getId(): ?int
  32.     {
  33.         return $this->id;
  34.     }
  35.     public function getNombre(): ?string
  36.     {
  37.         return $this->nombre;
  38.     }
  39.     public function setNombre(string $nombre): static
  40.     {
  41.         $this->nombre $nombre;
  42.         return $this;
  43.     }
  44.     public function getEstado(): ?ParEstado
  45.     {
  46.         return $this->estado;
  47.     }
  48.     public function setEstado(?ParEstado $estado): static
  49.     {
  50.         $this->estado $estado;
  51.         return $this;
  52.     }
  53.     /**
  54.      * @return Collection<int, GHDesvinculacion>
  55.      */
  56.     public function getDesvinculacion(): Collection
  57.     {
  58.         return $this->desvinculacion;
  59.     }
  60.     public function addDesvinculacion(GHDesvinculacion $desvinculacion): static
  61.     {
  62.         if (!$this->desvinculacion->contains($desvinculacion)) {
  63.             $this->desvinculacion->add($desvinculacion);
  64.             $desvinculacion->setMotivoDesvinculacion($this);
  65.         }
  66.         return $this;
  67.     }
  68.     public function removeDesvinculacion(GHDesvinculacion $desvinculacion): static
  69.     {
  70.         if ($this->desvinculacion->removeElement($desvinculacion)) {
  71.             // set the owning side to null (unless already changed)
  72.             if ($desvinculacion->getMotivoDesvinculacion() === $this) {
  73.                 $desvinculacion->setMotivoDesvinculacion(null);
  74.             }
  75.         }
  76.         return $this;
  77.     }
  78.     /**
  79.      * @return Collection<int, GHEntrevistaInfoLaboral>
  80.      */
  81.     public function getEntrevistasInfoLaboral(): Collection
  82.     {
  83.         return $this->entrevistasInfoLaboral;
  84.     }
  85.     public function addEntrevistasInfoLaboral(GHEntrevistaInfoLaboral $entrevistasInfoLaboral): static
  86.     {
  87.         if (!$this->entrevistasInfoLaboral->contains($entrevistasInfoLaboral)) {
  88.             $this->entrevistasInfoLaboral->add($entrevistasInfoLaboral);
  89.             $entrevistasInfoLaboral->setMotivoRetiro($this);
  90.         }
  91.         return $this;
  92.     }
  93.     public function removeEntrevistasInfoLaboral(GHEntrevistaInfoLaboral $entrevistasInfoLaboral): static
  94.     {
  95.         if ($this->entrevistasInfoLaboral->removeElement($entrevistasInfoLaboral)) {
  96.             // set the owning side to null (unless already changed)
  97.             if ($entrevistasInfoLaboral->getMotivoRetiro() === $this) {
  98.                 $entrevistasInfoLaboral->setMotivoRetiro(null);
  99.             }
  100.         }
  101.         return $this;
  102.     }
  103. }