<?php
namespace App\Entity;
use App\Repository\ParCompetenciaFuncionalRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ParCompetenciaFuncionalRepository::class)]
class ParCompetenciaFuncional {
#[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: 'competenciasFuncionales')]
private Collection $perfilCargo;
public function __construct()
{
$this->perfilCargo = 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;
}
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->addCompetenciasFuncionale($this);
}
return $this;
}
public function removePerfilCargo(GHPerfilCargo $perfilCargo): static
{
if ($this->perfilCargo->removeElement($perfilCargo)) {
$perfilCargo->removeCompetenciasFuncionale($this);
}
return $this;
}
}