src/Entity/ParCompetenciaFuncional.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ParCompetenciaFuncionalRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassParCompetenciaFuncionalRepository::class)]
  9. class ParCompetenciaFuncional {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255)]
  15.     private ?string $nombre null;
  16.     #[ORM\Column(typeTypes::TEXT)]
  17.     private ?string $descripcion null;
  18.     #[ORM\ManyToMany(targetEntityGHPerfilCargo::class, mappedBy'competenciasFuncionales')]
  19.     private Collection $perfilCargo;
  20.     public function __construct()
  21.     {
  22.         $this->perfilCargo = new ArrayCollection();
  23.     }
  24.     public function __toString() {
  25.         return $this->getNombre();
  26.     }
  27.     public function getId(): ?int {
  28.         return $this->id;
  29.     }
  30.     public function getNombre(): ?string {
  31.         return $this->nombre;
  32.     }
  33.     public function setNombre(string $nombre): static {
  34.         $this->nombre $nombre;
  35.         return $this;
  36.     }
  37.     public function getDescripcion(): ?string {
  38.         return $this->descripcion;
  39.     }
  40.     public function setDescripcion(string $descripcion): static {
  41.         $this->descripcion $descripcion;
  42.         return $this;
  43.     }
  44.     /**
  45.      * @return Collection<int, GHPerfilCargo>
  46.      */
  47.     public function getPerfilCargo(): Collection
  48.     {
  49.         return $this->perfilCargo;
  50.     }
  51.     public function addPerfilCargo(GHPerfilCargo $perfilCargo): static
  52.     {
  53.         if (!$this->perfilCargo->contains($perfilCargo)) {
  54.             $this->perfilCargo->add($perfilCargo);
  55.             $perfilCargo->addCompetenciasFuncionale($this);
  56.         }
  57.         return $this;
  58.     }
  59.     public function removePerfilCargo(GHPerfilCargo $perfilCargo): static
  60.     {
  61.         if ($this->perfilCargo->removeElement($perfilCargo)) {
  62.             $perfilCargo->removeCompetenciasFuncionale($this);
  63.         }
  64.         return $this;
  65.     }
  66. }