<?phpnamespace App\Entity;use App\Repository\ParNivelAutoridadRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ParNivelAutoridadRepository::class)]class ParNivelAutoridad{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\OneToMany(mappedBy: 'ParNivelAutoridad', targetEntity: GHPerfilCargo::class)] private Collection $idPerfilCargo; #[ORM\Column(length: 100)] private ?string $nombre = null; #[ORM\Column(type: 'text', nullable: true)] private ?string $descripcion = null; public function __construct() { $this->idPerfilCargo = new ArrayCollection(); } public function __toString() { return $this->getNombre(); } public function getId(): ?int { return $this->id; } /** * @return Collection<int, GHPerfilCargo> */ public function getIdPerfilCargo(): Collection { return $this->idPerfilCargo; } public function addIdPerfilCargo(GHPerfilCargo $idPerfilCargo): static { if (!$this->idPerfilCargo->contains($idPerfilCargo)) { $this->idPerfilCargo->add($idPerfilCargo); $idPerfilCargo->setParNivelAutoridad($this); } return $this; } public function removeIdPerfilCargo(GHPerfilCargo $idPerfilCargo): static { if ($this->idPerfilCargo->removeElement($idPerfilCargo)) { // set the owning side to null (unless already changed) if ($idPerfilCargo->getParNivelAutoridad() === $this) { $idPerfilCargo->setParNivelAutoridad(null); } } return $this; } public function getNombre(): ?string { return $this->nombre; } public function setNombre(string $nombre): static { $this->nombre = $nombre; return $this; } /** * Obtiene la descripción del nivel de autoridad. */ public function getDescripcion(): ?string { return $this->descripcion; } /** * Establece la descripción del nivel de autoridad. */ public function setDescripcion(?string $descripcion): static { $this->descripcion = $descripcion; return $this; }}