<?php
namespace App\Entity;
use App\Repository\ParCompetenciaOrganizacionalRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ParCompetenciaOrganizacionalRepository::class)]
class ParCompetenciaOrganizacional {
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $nombre = null;
#[ORM\Column(type: Types::TEXT)]
private ?string $descripcion = null;
#[ORM\ManyToMany(targetEntity: GHPerfilCargo::class, mappedBy: 'competenciasOrganizacionales')]
private Collection $perfilCargo;
public function __toString() {
return $this->getNombre();
}
public function __construct() {
$this->perfilCargo = 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;
}
public function getDescripcion(): ?string {
return $this->descripcion;
}
public function setDescripcion(string $descripcion): static {
$this->descripcion = $descripcion;
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->addCompetenciasOrganizacionale($this);
}
return $this;
}
public function removePerfilCargo(GHPerfilCargo $perfilCargo): static {
if ($this->perfilCargo->removeElement($perfilCargo)) {
$perfilCargo->removeCompetenciasOrganizacionale($this);
}
return $this;
}
}