<?phpnamespace App\Entity;use App\Repository\ParSistemaInformaticoRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ParSistemaInformaticoRepository::class)]class ParSistemaInformatico{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 100)] private ?string $nombre = null; #[ORM\OneToMany(mappedBy: 'sistema', targetEntity: GHEntrevistaInfoSistemas::class)] private Collection $sistema; #[ORM\ManyToOne(inversedBy: 'sistemaInfomatico')] private ?ParEstado $estado = null; #[ORM\ManyToMany(targetEntity: GHPerfilCargo::class, mappedBy: 'sistemaInformacion')] private Collection $perfilCargo; #[ORM\OneToMany(mappedBy: 'sistemaInformacion', targetEntity: GHSolicitudDotacionGesUsu::class)] private Collection $solicitudDotacionGesUsu; #[ORM\ManyToMany(targetEntity: ParTipoPermiso::class, inversedBy: 'sistemasInformaticos')] private Collection $permisosSistemas; #[ORM\Column(type: Types::TEXT, nullable: true)] private ?string $tipoPermisos = null; #[ORM\ManyToOne(inversedBy: 'sistemasInformaticos')] private ?ParProceso $procesoResponsable = null; public function __construct() { $this->sistema = new ArrayCollection(); $this->perfilCargo = new ArrayCollection(); $this->solicitudDotacionGesUsu = new ArrayCollection(); $this->permisosSistemas = 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; } /** * @return Collection<int, GHEntrevistaInfoSistemas> */ public function getSistema(): Collection { return $this->sistema; } public function addSistema(GHEntrevistaInfoSistemas $sistema): static { if (!$this->sistema->contains($sistema)) { $this->sistema->add($sistema); $sistema->setSistema($this); } return $this; } public function removeSistema(GHEntrevistaInfoSistemas $sistema): static { if ($this->sistema->removeElement($sistema)) { // set the owning side to null (unless already changed) if ($sistema->getSistema() === $this) { $sistema->setSistema(null); } } return $this; } public function getEstado(): ?ParEstado { return $this->estado; } public function setEstado(?ParEstado $estado): static { $this->estado = $estado; 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->addSistemaInformacion($this); } return $this; } public function removePerfilCargo(GHPerfilCargo $perfilCargo): static { if ($this->perfilCargo->removeElement($perfilCargo)) { $perfilCargo->removeSistemaInformacion($this); } return $this; } /** * @return Collection<int, GHSolicitudDotacionGesUsu> */ public function getSolicitudDotacionGesUsu(): Collection { return $this->solicitudDotacionGesUsu; } public function addSolicitudDotacionGesUsu(GHSolicitudDotacionGesUsu $solicitudDotacionGesUsu): static { if (!$this->solicitudDotacionGesUsu->contains($solicitudDotacionGesUsu)) { $this->solicitudDotacionGesUsu->add($solicitudDotacionGesUsu); $solicitudDotacionGesUsu->setSistemaInformacion($this); } return $this; } public function removeSolicitudDotacionGesUsu(GHSolicitudDotacionGesUsu $solicitudDotacionGesUsu): static { if ($this->solicitudDotacionGesUsu->removeElement($solicitudDotacionGesUsu)) { // set the owning side to null (unless already changed) if ($solicitudDotacionGesUsu->getSistemaInformacion() === $this) { $solicitudDotacionGesUsu->setSistemaInformacion(null); } } return $this; } public function getTipoPermisos(): ?string { return $this->tipoPermisos; } public function setTipoPermisos(?string $tipoPermisos): static { $this->tipoPermisos = $tipoPermisos; return $this; } public function getProcesoResponsable(): ?ParProceso { return $this->procesoResponsable; } public function setProcesoResponsable(?ParProceso $procesoResponsable): static { $this->procesoResponsable = $procesoResponsable; return $this; } /** * @return Collection */ public function getPermisosSistemas(): Collection { return $this->permisosSistemas; } public function addPermisosSistemas(ParTipoPermiso $tipoPermiso): static{ if (!$this->permisosSistemas->contains($tipoPermiso)) { $this->permisosSistemas->add($tipoPermiso); } return $this; } public function removePermisosSistemas(ParTipoPermiso $tipoPermiso): static { $this->permisosSistemas->removeElement($tipoPermiso); return $this; }}