src/Entity/ParCompetenciaOrganizacional.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ParCompetenciaOrganizacionalRepository;
  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(repositoryClassParCompetenciaOrganizacionalRepository::class)]
  9. class ParCompetenciaOrganizacional {
  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'competenciasOrganizacionales')]
  19.     private Collection $perfilCargo;
  20.     public function __toString() {
  21.         return $this->getNombre();
  22.     }
  23.     public function __construct() {
  24.         $this->perfilCargo = new ArrayCollection();
  25.     }
  26.     public function getId(): ?int {
  27.         return $this->id;
  28.     }
  29.     public function getNombre(): ?string {
  30.         return $this->nombre;
  31.     }
  32.     public function setNombre(string $nombre): static {
  33.         $this->nombre $nombre;
  34.         return $this;
  35.     }
  36.     public function getDescripcion(): ?string {
  37.         return $this->descripcion;
  38.     }
  39.     public function setDescripcion(string $descripcion): static {
  40.         $this->descripcion $descripcion;
  41.         return $this;
  42.     }
  43.     /**
  44.      * @return Collection<int, GHPerfilCargo>
  45.      */
  46.     public function getPerfilCargo(): Collection {
  47.         return $this->perfilCargo;
  48.     }
  49.     public function addPerfilCargo(GHPerfilCargo $perfilCargo): static {
  50.         if (!$this->perfilCargo->contains($perfilCargo)) {
  51.             $this->perfilCargo->add($perfilCargo);
  52.             $perfilCargo->addCompetenciasOrganizacionale($this);
  53.         }
  54.         return $this;
  55.     }
  56.     public function removePerfilCargo(GHPerfilCargo $perfilCargo): static {
  57.         if ($this->perfilCargo->removeElement($perfilCargo)) {
  58.             $perfilCargo->removeCompetenciasOrganizacionale($this);
  59.         }
  60.         return $this;
  61.     }
  62. }