src/Entity/SecAccion.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SecAccionRepository;
  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(repositoryClassSecAccionRepository::class)]
  9. class SecAccion
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $nombre null;
  17.     #[ORM\Column(length50nullabletrue)]
  18.     private ?string $etiqueta null;
  19.     #[ORM\Column(length255)]
  20.     private ?string $ruta null;
  21.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  22.     private ?string $rutaAuxiliar null;
  23.     #[ORM\Column]
  24.     private ?int $orden null;
  25.     #[ORM\Column]
  26.     private ?\DateTimeImmutable $createAt null;
  27.     #[ORM\Column]
  28.     private ?\DateTimeImmutable $updateAt null;
  29.     #[ORM\Column(length100nullabletrue)]
  30.     private ?string $icono null;
  31.     #[ORM\Column(length100nullabletrue)]
  32.     private ?string $class null;
  33.     #[ORM\Column(length50nullabletrue)]
  34.     private ?string $endpoint null;
  35.     #[ORM\Column]
  36.     private ?int $tipo null;
  37.     #[ORM\Column(nullabletrue)]
  38.     private ?bool $parametrica null;
  39.     #[ORM\ManyToMany(targetEntitySecRol::class, mappedBy'accion')]
  40.     private Collection $rol;
  41.     #[ORM\ManyToOne(inversedBy'secAccion')]
  42.     private ?SecFuncion $funcion null;
  43.     #[ORM\Column(nullabletrue)]
  44.     private ?int $grupo null;
  45.     #[ORM\Column(nullabletrue)]
  46.     private ?int $subGrupo null;
  47.     public function __construct()
  48.     {
  49.         $this->rol = new ArrayCollection();
  50.     }
  51.     public function __toString() {
  52.         return $this->getNombre();
  53.     }
  54.     public function getId(): ?int
  55.     {
  56.         return $this->id;
  57.     }
  58.     public function getNombre(): ?string
  59.     {
  60.         return $this->nombre;
  61.     }
  62.     public function setNombre(string $nombre): static
  63.     {
  64.         $this->nombre $nombre;
  65.         return $this;
  66.     }
  67.     public function getEtiqueta(): ?string
  68.     {
  69.         return $this->etiqueta;
  70.     }
  71.     public function setEtiqueta(?string $etiqueta): static
  72.     {
  73.         $this->etiqueta $etiqueta;
  74.         return $this;
  75.     }
  76.     public function getRuta(): ?string
  77.     {
  78.         return $this->ruta;
  79.     }
  80.     public function setRuta(string $ruta): static
  81.     {
  82.         $this->ruta $ruta;
  83.         return $this;
  84.     }
  85.     public function getRutaAuxiliar(): ?string
  86.     {
  87.         return $this->rutaAuxiliar;
  88.     }
  89.     public function setRutaAuxiliar(?string $rutaAuxiliar): static
  90.     {
  91.         $this->rutaAuxiliar $rutaAuxiliar;
  92.         return $this;
  93.     }
  94.     public function getOrden(): ?int
  95.     {
  96.         return $this->orden;
  97.     }
  98.     public function setOrden(int $orden): static
  99.     {
  100.         $this->orden $orden;
  101.         return $this;
  102.     }
  103.     public function getCreateAt(): ?\DateTimeImmutable
  104.     {
  105.         return $this->createAt;
  106.     }
  107.     public function setCreateAt(\DateTimeImmutable $createAt): static
  108.     {
  109.         $this->createAt $createAt;
  110.         return $this;
  111.     }
  112.     public function getUpdateAt(): ?\DateTimeImmutable
  113.     {
  114.         return $this->updateAt;
  115.     }
  116.     public function setUpdateAt(\DateTimeImmutable $updateAt): static
  117.     {
  118.         $this->updateAt $updateAt;
  119.         return $this;
  120.     }
  121.     public function getIcono(): ?string
  122.     {
  123.         return $this->icono;
  124.     }
  125.     public function setIcono(?string $icono): static
  126.     {
  127.         $this->icono $icono;
  128.         return $this;
  129.     }
  130.     public function getClass(): ?string
  131.     {
  132.         return $this->class;
  133.     }
  134.     public function setClass(?string $class): static
  135.     {
  136.         $this->class $class;
  137.         return $this;
  138.     }
  139.     public function getEndpoint(): ?string
  140.     {
  141.         return $this->endpoint;
  142.     }
  143.     public function setEndpoint(?string $endpoint): static
  144.     {
  145.         $this->endpoint $endpoint;
  146.         return $this;
  147.     }
  148.     public function getTipo(): ?int
  149.     {
  150.         return $this->tipo;
  151.     }
  152.     public function setTipo(int $tipo): static
  153.     {
  154.         $this->tipo $tipo;
  155.         return $this;
  156.     }
  157.     public function isParametrica(): ?bool
  158.     {
  159.         return $this->parametrica;
  160.     }
  161.     public function setParametrica(?bool $parametrica): static
  162.     {
  163.         $this->parametrica $parametrica;
  164.         return $this;
  165.     }
  166.    
  167.     /**
  168.      * @return Collection<int, SecRol>
  169.      */
  170.     public function getRol(): Collection
  171.     {
  172.         return $this->rol;
  173.     }
  174.     public function addSecRol(SecRol $secRol): static
  175.     {
  176.         if (!$this->rol->contains($secRol)) {
  177.             $this->rol->add($secRol);
  178.             $secRol->addAccion($this);
  179.         }
  180.         return $this;
  181.     }
  182.     public function removeRol(SecRol $secRol): static
  183.     {
  184.         if ($this->rol->removeElement($secRol)) {
  185.             $secRol->removeSecAccion($this);
  186.         }
  187.         return $this;
  188.     }
  189.     public function getFuncion(): ?SecFuncion
  190.     {
  191.         return $this->funcion;
  192.     }
  193.     public function setFuncion(?SecFuncion $funcion): static
  194.     {
  195.         $this->funcion $funcion;
  196.         return $this;
  197.     }
  198.     public function getGrupo(): ?int
  199.     {
  200.         return $this->grupo;
  201.     }
  202.     public function setGrupo(?int $grupo): static
  203.     {
  204.         $this->grupo $grupo;
  205.         return $this;
  206.     }
  207.     public function getSubGrupo(): ?int
  208.     {
  209.         return $this->subGrupo;
  210.     }
  211.     public function setSubGrupo(?int $subGrupo): static
  212.     {
  213.         $this->subGrupo $subGrupo;
  214.         return $this;
  215.     }
  216. }