src/Entity/ParRecursosPerfil.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ParRecursosPerfilRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassParRecursosPerfilRepository::class)]
  8. class ParRecursosPerfil {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column(length255)]
  14.     private ?string $nombre null;
  15.     #[ORM\ManyToMany(targetEntityGHPerfilCargo::class, mappedBy'recursos')]
  16.     private Collection $perfilCargo;
  17.     #[ORM\ManyToOne(inversedBy'recursosPerfil')]
  18.     private ?ParProceso $proceso null;
  19.     #[ORM\ManyToMany(targetEntityGHSolicitudDotacion::class, mappedBy'recursosPerfilCargo')]
  20.     private Collection $solicitudDotacion;
  21.     public function __toString(): string {
  22.         return $this->getNombre();
  23.     }
  24.     public function __construct() {
  25.         $this->perfilCargo = new ArrayCollection();
  26.         $this->solicitudDotacion = new ArrayCollection();
  27.     }
  28.     public function getId(): ?int {
  29.         return $this->id;
  30.     }
  31.     public function getNombre(): ?string {
  32.         return $this->nombre;
  33.     }
  34.     public function setNombre(string $nombre): static {
  35.         $this->nombre $nombre;
  36.         return $this;
  37.     }
  38.     /**
  39.      * @return Collection<int, GHPerfilCargo>
  40.      */
  41.     public function getPerfilCargo(): Collection {
  42.         return $this->perfilCargo;
  43.     }
  44.     public function addPerfilCargo(GHPerfilCargo $perfilCargo): static {
  45.         if (!$this->perfilCargo->contains($perfilCargo)) {
  46.             $this->perfilCargo->add($perfilCargo);
  47.             $perfilCargo->addRecurso($this);
  48.         }
  49.         return $this;
  50.     }
  51.     public function removePerfilCargo(GHPerfilCargo $perfilCargo): static {
  52.         if ($this->perfilCargo->removeElement($perfilCargo)) {
  53.             $perfilCargo->removeRecurso($this);
  54.         }
  55.         return $this;
  56.     }
  57.     public function getProceso(): ?ParProceso
  58.     {
  59.         return $this->proceso;
  60.     }
  61.     public function setProceso(?ParProceso $proceso): static
  62.     {
  63.         $this->proceso $proceso;
  64.         return $this;
  65.     }
  66.     /**
  67.      * @return Collection<int, GHSolicitudDotacion>
  68.      */
  69.     public function getSolicitudDotacion(): Collection
  70.     {
  71.         return $this->solicitudDotacion;
  72.     }
  73.     public function addSolicitudDotacion(GHSolicitudDotacion $solicitudDotacion): static
  74.     {
  75.         if (!$this->solicitudDotacion->contains($solicitudDotacion)) {
  76.             $this->solicitudDotacion->add($solicitudDotacion);
  77.             $solicitudDotacion->addRecursosPerfilCargo($this);
  78.         }
  79.         return $this;
  80.     }
  81.     public function removeSolicitudDotacion(GHSolicitudDotacion $solicitudDotacion): static
  82.     {
  83.         if ($this->solicitudDotacion->removeElement($solicitudDotacion)) {
  84.             $solicitudDotacion->removeRecursosPerfilCargo($this);
  85.         }
  86.         return $this;
  87.     }
  88. }