<?phpnamespace App\Entity;use App\Repository\ParMotivoRetiroRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ParMotivoRetiroRepository::class)]class ParMotivoRetiro { #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 100)] private ?string $nombre = null; #[ORM\ManyToMany(targetEntity: GHEntrevistaRetiro::class, mappedBy: 'motivoRetiro')] private Collection $entrevistaRetiro; #[ORM\OneToMany(mappedBy: 'motivoRetiro', targetEntity: GHDesvinculacion::class)] private Collection $desvinculacion; #[ORM\ManyToOne(inversedBy: 'parMotivoRetiros')] private ?ParEstado $estado = null; public function __toString() { return $this->getNombre(); } public function __construct() { $this->entrevistaInfoLaboral = new ArrayCollection(); $this->entrevistaRetiro = new ArrayCollection(); $this->desvinculacion = new ArrayCollection(); } 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; } /** * @return Collection<int, GHEntrevistaRetiro> */ public function getEntrevistaRetiro(): Collection { return $this->entrevistaRetiro; } public function addEntrevistaRetiro(GHEntrevistaRetiro $entrevistaRetiro): static { if (!$this->entrevistaRetiro->contains($entrevistaRetiro)) { $this->entrevistaRetiro->add($entrevistaRetiro); $entrevistaRetiro->addMotivoRetiro($this); } return $this; } public function removeEntrevistaRetiro(GHEntrevistaRetiro $entrevistaRetiro): static { if ($this->entrevistaRetiro->removeElement($entrevistaRetiro)) { $entrevistaRetiro->removeMotivoRetiro($this); } 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->setMotivoRetiro($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->getMotivoRetiro() === $this) { $desvinculacion->setMotivoRetiro(null); } } return $this; } public function getEstado(): ?ParEstado { return $this->estado; } public function setEstado(?ParEstado $estado): static { $this->estado = $estado; return $this; }}