<?phpnamespace App\Entity;use App\Repository\ParMotivoDesvinculacionRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ParMotivoDesvinculacionRepository::class)]class ParMotivoDesvinculacion{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 100)] private ?string $nombre = null; #[ORM\ManyToOne(inversedBy: 'motivoDesvinculacion')] private ?ParEstado $estado = null; #[ORM\OneToMany(mappedBy: 'motivoDesvinculacion', targetEntity: GHDesvinculacion::class)] private Collection $desvinculacion; #[ORM\OneToMany(mappedBy: 'motivoRetiro', targetEntity: GHEntrevistaInfoLaboral::class)] private Collection $entrevistasInfoLaboral; public function __construct() { $this->desvinculacion = new ArrayCollection(); $this->entrevistasInfoLaboral = 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; } public function getEstado(): ?ParEstado { return $this->estado; } public function setEstado(?ParEstado $estado): static { $this->estado = $estado; return $this; } /** * @return Collection<int, GHDesvinculacion> */ public function getDesvinculacion(): Collection { return $this->desvinculacion; } public function addDesvinculacion(GHDesvinculacion $desvinculacion): static { if (!$this->desvinculacion->contains($desvinculacion)) { $this->desvinculacion->add($desvinculacion); $desvinculacion->setMotivoDesvinculacion($this); } return $this; } public function removeDesvinculacion(GHDesvinculacion $desvinculacion): static { if ($this->desvinculacion->removeElement($desvinculacion)) { // set the owning side to null (unless already changed) if ($desvinculacion->getMotivoDesvinculacion() === $this) { $desvinculacion->setMotivoDesvinculacion(null); } } return $this; } /** * @return Collection<int, GHEntrevistaInfoLaboral> */ public function getEntrevistasInfoLaboral(): Collection { return $this->entrevistasInfoLaboral; } public function addEntrevistasInfoLaboral(GHEntrevistaInfoLaboral $entrevistasInfoLaboral): static { if (!$this->entrevistasInfoLaboral->contains($entrevistasInfoLaboral)) { $this->entrevistasInfoLaboral->add($entrevistasInfoLaboral); $entrevistasInfoLaboral->setMotivoRetiro($this); } return $this; } public function removeEntrevistasInfoLaboral(GHEntrevistaInfoLaboral $entrevistasInfoLaboral): static { if ($this->entrevistasInfoLaboral->removeElement($entrevistasInfoLaboral)) { // set the owning side to null (unless already changed) if ($entrevistasInfoLaboral->getMotivoRetiro() === $this) { $entrevistasInfoLaboral->setMotivoRetiro(null); } } return $this; }}