<?phpnamespace App\Entity;use App\Repository\ParRecursosPerfilRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ParRecursosPerfilRepository::class)]class ParRecursosPerfil { #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255)] private ?string $nombre = null; #[ORM\ManyToMany(targetEntity: GHPerfilCargo::class, mappedBy: 'recursos')] private Collection $perfilCargo; #[ORM\ManyToOne(inversedBy: 'recursosPerfil')] private ?ParProceso $proceso = null; #[ORM\ManyToMany(targetEntity: GHSolicitudDotacion::class, mappedBy: 'recursosPerfilCargo')] private Collection $solicitudDotacion; public function __toString(): string { return $this->getNombre(); } public function __construct() { $this->perfilCargo = new ArrayCollection(); $this->solicitudDotacion = 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, GHPerfilCargo> */ public function getPerfilCargo(): Collection { return $this->perfilCargo; } public function addPerfilCargo(GHPerfilCargo $perfilCargo): static { if (!$this->perfilCargo->contains($perfilCargo)) { $this->perfilCargo->add($perfilCargo); $perfilCargo->addRecurso($this); } return $this; } public function removePerfilCargo(GHPerfilCargo $perfilCargo): static { if ($this->perfilCargo->removeElement($perfilCargo)) { $perfilCargo->removeRecurso($this); } return $this; } public function getProceso(): ?ParProceso { return $this->proceso; } public function setProceso(?ParProceso $proceso): static { $this->proceso = $proceso; return $this; } /** * @return Collection<int, GHSolicitudDotacion> */ public function getSolicitudDotacion(): Collection { return $this->solicitudDotacion; } public function addSolicitudDotacion(GHSolicitudDotacion $solicitudDotacion): static { if (!$this->solicitudDotacion->contains($solicitudDotacion)) { $this->solicitudDotacion->add($solicitudDotacion); $solicitudDotacion->addRecursosPerfilCargo($this); } return $this; } public function removeSolicitudDotacion(GHSolicitudDotacion $solicitudDotacion): static { if ($this->solicitudDotacion->removeElement($solicitudDotacion)) { $solicitudDotacion->removeRecursosPerfilCargo($this); } return $this; }}