<?phpnamespace App\Entity;use App\Repository\SecAccionRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: SecAccionRepository::class)]class SecAccion{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255)] private ?string $nombre = null; #[ORM\Column(length: 50, nullable: true)] private ?string $etiqueta = null; #[ORM\Column(length: 255)] private ?string $ruta = null; #[ORM\Column(type: Types::TEXT, nullable: true)] private ?string $rutaAuxiliar = null; #[ORM\Column] private ?int $orden = null; #[ORM\Column] private ?\DateTimeImmutable $createAt = null; #[ORM\Column] private ?\DateTimeImmutable $updateAt = null; #[ORM\Column(length: 100, nullable: true)] private ?string $icono = null; #[ORM\Column(length: 100, nullable: true)] private ?string $class = null; #[ORM\Column(length: 50, nullable: true)] private ?string $endpoint = null; #[ORM\Column] private ?int $tipo = null; #[ORM\Column(nullable: true)] private ?bool $parametrica = null; #[ORM\ManyToMany(targetEntity: SecRol::class, mappedBy: 'accion')] private Collection $rol; #[ORM\ManyToOne(inversedBy: 'secAccion')] private ?SecFuncion $funcion = null; #[ORM\Column(nullable: true)] private ?int $grupo = null; #[ORM\Column(nullable: true)] private ?int $subGrupo = null; public function __construct() { $this->rol = 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; } public function getEtiqueta(): ?string { return $this->etiqueta; } public function setEtiqueta(?string $etiqueta): static { $this->etiqueta = $etiqueta; return $this; } public function getRuta(): ?string { return $this->ruta; } public function setRuta(string $ruta): static { $this->ruta = $ruta; return $this; } public function getRutaAuxiliar(): ?string { return $this->rutaAuxiliar; } public function setRutaAuxiliar(?string $rutaAuxiliar): static { $this->rutaAuxiliar = $rutaAuxiliar; return $this; } public function getOrden(): ?int { return $this->orden; } public function setOrden(int $orden): static { $this->orden = $orden; return $this; } public function getCreateAt(): ?\DateTimeImmutable { return $this->createAt; } public function setCreateAt(\DateTimeImmutable $createAt): static { $this->createAt = $createAt; return $this; } public function getUpdateAt(): ?\DateTimeImmutable { return $this->updateAt; } public function setUpdateAt(\DateTimeImmutable $updateAt): static { $this->updateAt = $updateAt; return $this; } public function getIcono(): ?string { return $this->icono; } public function setIcono(?string $icono): static { $this->icono = $icono; return $this; } public function getClass(): ?string { return $this->class; } public function setClass(?string $class): static { $this->class = $class; return $this; } public function getEndpoint(): ?string { return $this->endpoint; } public function setEndpoint(?string $endpoint): static { $this->endpoint = $endpoint; return $this; } public function getTipo(): ?int { return $this->tipo; } public function setTipo(int $tipo): static { $this->tipo = $tipo; return $this; } public function isParametrica(): ?bool { return $this->parametrica; } public function setParametrica(?bool $parametrica): static { $this->parametrica = $parametrica; return $this; } /** * @return Collection<int, SecRol> */ public function getRol(): Collection { return $this->rol; } public function addSecRol(SecRol $secRol): static { if (!$this->rol->contains($secRol)) { $this->rol->add($secRol); $secRol->addAccion($this); } return $this; } public function removeRol(SecRol $secRol): static { if ($this->rol->removeElement($secRol)) { $secRol->removeSecAccion($this); } return $this; } public function getFuncion(): ?SecFuncion { return $this->funcion; } public function setFuncion(?SecFuncion $funcion): static { $this->funcion = $funcion; return $this; } public function getGrupo(): ?int { return $this->grupo; } public function setGrupo(?int $grupo): static { $this->grupo = $grupo; return $this; } public function getSubGrupo(): ?int { return $this->subGrupo; } public function setSubGrupo(?int $subGrupo): static { $this->subGrupo = $subGrupo; return $this; }}