src/Entity/ParSistemaInformatico.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ParSistemaInformaticoRepository;
  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(repositoryClassParSistemaInformaticoRepository::class)]
  9. class ParSistemaInformatico
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length100)]
  16.     private ?string $nombre null;
  17.     #[ORM\OneToMany(mappedBy'sistema'targetEntityGHEntrevistaInfoSistemas::class)]
  18.     private Collection $sistema;
  19.     #[ORM\ManyToOne(inversedBy'sistemaInfomatico')]
  20.     private ?ParEstado $estado null;
  21.     #[ORM\ManyToMany(targetEntityGHPerfilCargo::class, mappedBy'sistemaInformacion')]
  22.     private Collection $perfilCargo;
  23.     #[ORM\OneToMany(mappedBy'sistemaInformacion'targetEntityGHSolicitudDotacionGesUsu::class)]
  24.     private Collection $solicitudDotacionGesUsu;
  25.     #[ORM\ManyToMany(targetEntityParTipoPermiso::class, inversedBy'sistemasInformaticos')]
  26.     private Collection $permisosSistemas;
  27.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  28.     private ?string $tipoPermisos null;
  29.     #[ORM\ManyToOne(inversedBy'sistemasInformaticos')]
  30.     private ?ParProceso $procesoResponsable null;
  31.     public function __construct()
  32.     {
  33.         $this->sistema = new ArrayCollection();
  34.         $this->perfilCargo = new ArrayCollection();
  35.         $this->solicitudDotacionGesUsu = new ArrayCollection();
  36.         $this->permisosSistemas = new ArrayCollection();
  37.     }
  38.     
  39.     public function __toString() {
  40.         return $this->getNombre();
  41.     }
  42.     public function getId(): ?int
  43.     {
  44.         return $this->id;
  45.     }
  46.     public function getNombre(): ?string
  47.     {
  48.         return $this->nombre;
  49.     }
  50.     public function setNombre(string $nombre): static
  51.     {
  52.         $this->nombre $nombre;
  53.         return $this;
  54.     }
  55.     /**
  56.      * @return Collection<int, GHEntrevistaInfoSistemas>
  57.      */
  58.     public function getSistema(): Collection
  59.     {
  60.         return $this->sistema;
  61.     }
  62.     public function addSistema(GHEntrevistaInfoSistemas $sistema): static
  63.     {
  64.         if (!$this->sistema->contains($sistema)) {
  65.             $this->sistema->add($sistema);
  66.             $sistema->setSistema($this);
  67.         }
  68.         return $this;
  69.     }
  70.     public function removeSistema(GHEntrevistaInfoSistemas $sistema): static
  71.     {
  72.         if ($this->sistema->removeElement($sistema)) {
  73.             // set the owning side to null (unless already changed)
  74.             if ($sistema->getSistema() === $this) {
  75.                 $sistema->setSistema(null);
  76.             }
  77.         }
  78.         return $this;
  79.     }
  80.     public function getEstado(): ?ParEstado
  81.     {
  82.         return $this->estado;
  83.     }
  84.     public function setEstado(?ParEstado $estado): static
  85.     {
  86.         $this->estado $estado;
  87.         return $this;
  88.     }
  89.     /**
  90.      * @return Collection<int, GHPerfilCargo>
  91.      */
  92.     public function getPerfilCargo(): Collection
  93.     {
  94.         return $this->perfilCargo;
  95.     }
  96.     public function addPerfilCargo(GHPerfilCargo $perfilCargo): static
  97.     {
  98.         if (!$this->perfilCargo->contains($perfilCargo)) {
  99.             $this->perfilCargo->add($perfilCargo);
  100.             $perfilCargo->addSistemaInformacion($this);
  101.         }
  102.         return $this;
  103.     }
  104.     public function removePerfilCargo(GHPerfilCargo $perfilCargo): static
  105.     {
  106.         if ($this->perfilCargo->removeElement($perfilCargo)) {
  107.             $perfilCargo->removeSistemaInformacion($this);
  108.         }
  109.         return $this;
  110.     }
  111.     /**
  112.      * @return Collection<int, GHSolicitudDotacionGesUsu>
  113.      */
  114.     public function getSolicitudDotacionGesUsu(): Collection
  115.     {
  116.         return $this->solicitudDotacionGesUsu;
  117.     }
  118.     public function addSolicitudDotacionGesUsu(GHSolicitudDotacionGesUsu $solicitudDotacionGesUsu): static
  119.     {
  120.         if (!$this->solicitudDotacionGesUsu->contains($solicitudDotacionGesUsu)) {
  121.             $this->solicitudDotacionGesUsu->add($solicitudDotacionGesUsu);
  122.             $solicitudDotacionGesUsu->setSistemaInformacion($this);
  123.         }
  124.         return $this;
  125.     }
  126.     public function removeSolicitudDotacionGesUsu(GHSolicitudDotacionGesUsu $solicitudDotacionGesUsu): static
  127.     {
  128.         if ($this->solicitudDotacionGesUsu->removeElement($solicitudDotacionGesUsu)) {
  129.             // set the owning side to null (unless already changed)
  130.             if ($solicitudDotacionGesUsu->getSistemaInformacion() === $this) {
  131.                 $solicitudDotacionGesUsu->setSistemaInformacion(null);
  132.             }
  133.         }
  134.         return $this;
  135.     }
  136.     public function getTipoPermisos(): ?string
  137.     {
  138.         return $this->tipoPermisos;
  139.     }
  140.     public function setTipoPermisos(?string $tipoPermisos): static
  141.     {
  142.         $this->tipoPermisos $tipoPermisos;
  143.         return $this;
  144.     }
  145.     public function getProcesoResponsable(): ?ParProceso
  146.     {
  147.         return $this->procesoResponsable;
  148.     }
  149.     public function setProcesoResponsable(?ParProceso $procesoResponsable): static
  150.     {
  151.         $this->procesoResponsable $procesoResponsable;
  152.         return $this;
  153.     }
  154.     /**
  155.      * @return Collection
  156.      */
  157.     public function getPermisosSistemas(): Collection
  158.     {
  159.         return $this->permisosSistemas;
  160.     }
  161.     public function addPermisosSistemas(ParTipoPermiso $tipoPermiso): static{
  162.         if (!$this->permisosSistemas->contains($tipoPermiso)) {
  163.             $this->permisosSistemas->add($tipoPermiso);
  164.         }
  165.         return $this;
  166.     }
  167.     public function removePermisosSistemas(ParTipoPermiso $tipoPermiso): static {
  168.         $this->permisosSistemas->removeElement($tipoPermiso);
  169.         return $this;
  170.     }
  171. }