<?phpnamespace App\Entity;use App\Repository\ParInversionRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ParInversionRepository::class)]class ParInversion{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255)] private ?string $nombre = null; #[ORM\OneToMany(mappedBy: 'inversion', targetEntity: GHRetiroCesantias::class)] private Collection $retiroCesantias; #[ORM\ManyToMany(targetEntity: DocDocumento::class, inversedBy: 'documentoInversion')] private Collection $documento; #[ORM\Column(length: 255, nullable: true)] private ?string $documentosAnexar = null; public function __construct() { $this->retiroCesantias = new ArrayCollection(); $this->documento = 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, GHRetiroCesantias> */ public function getRetiroCesantias(): Collection { return $this->retiroCesantias; } public function addRetiroCesantia(GHRetiroCesantias $retiroCesantia): static { if (!$this->retiroCesantias->contains($retiroCesantia)) { $this->retiroCesantias->add($retiroCesantia); $retiroCesantia->setInversion($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->getInversion() === $this) { $retiroCesantia->setInversion(null); } } return $this; } /** * @return Collection<int, DocDocumento> */ public function getDocumento(): Collection { return $this->documento; } public function addDocumento(DocDocumento $documento): static { if (!$this->documento->contains($documento)) { $this->documento->add($documento); } return $this; } public function removeDocumento(DocDocumento $documento): static { $this->documento->removeElement($documento); return $this; } public function getDocumentosAnexar(): ?string { return $this->documentosAnexar; } public function setDocumentosAnexar(?string $documentosAnexar): static { $this->documentosAnexar = $documentosAnexar; return $this; }}