<?phpnamespace App\Entity;use App\Repository\ParFondoCesantiasRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ParFondoCesantiasRepository::class)]class ParFondoCesantias{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255)] private ?string $nombre = null; #[ORM\OneToMany(mappedBy: 'fondoCesantias', targetEntity: TerPersona::class)] private Collection $persona; #[ORM\OneToMany(mappedBy: 'fondoCesantias', targetEntity: GHRetiroCesantias::class)] private Collection $retiroCesantias; public function __construct() { $this->persona = new ArrayCollection(); $this->retiroCesantias = 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; } /** * @return Collection<int, TerPersona> */ public function getPersona(): Collection { return $this->persona; } public function addPersona(TerPersona $persona): static { if (!$this->persona->contains($persona)) { $this->persona->add($persona); $persona->setFondoCesantias($this); } return $this; } public function removePersona(TerPersona $persona): static { if ($this->persona->removeElement($persona)) { // set the owning side to null (unless already changed) if ($persona->getFondoCesantias() === $this) { $persona->setFondoCesantias(null); } } return $this; } /** * @return Collection<int, GHRetiroCesantias> */ public function getRetiroCesantias(): Collection { return $this->retiroCesantias; } public function addRetiroCesantia(GHRetiroCesantias $retiroCesantia): static { if (!$this->retiroCesantias->contains($retiroCesantia)) { $this->retiroCesantias->add($retiroCesantia); $retiroCesantia->setFondoCesantias($this); } return $this; } public function removeRetiroCesantia(GHRetiroCesantias $retiroCesantia): static { if ($this->retiroCesantias->removeElement($retiroCesantia)) { // set the owning side to null (unless already changed) if ($retiroCesantia->getFondoCesantias() === $this) { $retiroCesantia->setFondoCesantias(null); } } return $this; }}