src/Entity/User.php line 23

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UserRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  8. use Symfony\Component\Security\Core\User\EquatableInterface;
  9. use Symfony\Component\Security\Core\User\UserInterface;
  10. use Symfony\Component\Validator\Constraints as Assert;
  11. use Symfony\Component\Validator\Context\ExecutionContextInterface;
  12. use Symfony\Component\HttpFoundation\File\File;
  13. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  14. /**
  15.  * @ORM\Entity(repositoryClass=UserRepository::class)
  16.  * @UniqueEntity(fields={"username"})
  17.  * @UniqueEntity(fields={"email"})
  18.  * @Vich\Uploadable
  19.  */
  20. class User implements UserInterfaceEquatableInterface
  21. {
  22.     /**
  23.      * @ORM\Id()
  24.      * @ORM\GeneratedValue()
  25.      * @ORM\Column(type="integer")
  26.      */
  27.     private $id;
  28.     /**
  29.      * @ORM\Column(type="string", length=180, unique=true)
  30.      * @Assert\NotBlank( message="No puede estar vacio")
  31.      */
  32.     private $username;
  33.     /**
  34.      * @ORM\Column(type="json")
  35.      */
  36.     private $roles = [];
  37.     /**
  38.      * @ORM\Column(type="string", length=50)
  39.      * @Assert\NotBlank(message="No puede estar vacio")
  40.      */
  41.     private $nomComplet;
  42.     /**
  43.      * @ORM\Column(type="string", length=100, unique=true)
  44.      * @Assert\NotBlank(message="No puede estar vacio")
  45.      * @Assert\Email(message="Email inválido")
  46.      */
  47.     private $email;
  48.     /**
  49.      * @ORM\Column(type="boolean")
  50.      */
  51.     private $valid;
  52.     /**
  53.      * @ORM\Column(type="boolean")
  54.      */
  55.     private $deleted;
  56.     /**
  57.      * @ORM\Column(type="string", length=255))
  58.      */
  59.     private $password;
  60.     /**
  61.      * @ORM\Column(type="boolean")
  62.      */
  63.     private $admin;
  64.     /**
  65.      * @ORM\Column(type="datetime", nullable=true)
  66.      */
  67.     private $fechaActualizacion;
  68.     /**
  69.      * @ORM\Column(type="string", length=255, nullable=true)
  70.      */
  71.     private $documentoName;
  72.     /**
  73.      * NOTE: This is not a mapped field of entity metadata, just a simple property.
  74.      * @Assert\File(
  75.      *     maxSize = "200Mi",
  76.      *     mimeTypes={ "image/*" }
  77.      * )
  78.      * @Vich\UploadableField(mapping="usuarios_perfil", fileNameProperty="documentoName")
  79.      * @var File
  80.      */
  81.     private $documentoFile;
  82.     /**
  83.      * @ORM\ManyToOne(targetEntity=Conductor::class)
  84.      */
  85.     private $conductor;
  86.     /**
  87.      * @ORM\Column(type="boolean", nullable=true)
  88.      */
  89.     private $verInformeGestionRuta;
  90.     /**
  91.      * @ORM\Column(type="boolean", nullable=true)
  92.      */
  93.     private $gestionarDesviaciones;
  94.     
  95.     /**
  96.      * @ORM\Column(type="boolean", nullable=true)
  97.      */
  98.     private $solicitudRetiro;
  99.     /**
  100.      * @ORM\Column(type="boolean", nullable=true)
  101.      */
  102.     private $cerrarOrdenes;
  103.     /**
  104.      * @ORM\Column(type="datetime", nullable=true)
  105.      */
  106.     private $fechaCreacion;
  107.     /**
  108.      * @ORM\Column(type="datetime", nullable=true)
  109.      */
  110.     private $fechaUltimoLogin;
  111.     /**
  112.      * @ORM\Column(type="datetime", nullable=true)
  113.      */
  114.     private $fechaCambioClave;
  115.     /**
  116.      * @ORM\Column(type="datetime", nullable=true)
  117.      */
  118.     private $fechaBloqueoClave;
  119.     /**
  120.      * @ORM\Column(type="integer", nullable=true)
  121.      */
  122.     private $contadorLoginFallido;
  123.     /**
  124.      * @ORM\Column(type="datetime", nullable=true)
  125.      */
  126.     private $fechaLoginFallido;
  127.     /**
  128.      * @ORM\Column(type="datetime", nullable=true)
  129.      */
  130.     private $fechaExpiracionClave;
  131.     /**
  132.      * @ORM\Column(type="datetime", nullable=true)
  133.      */
  134.     private $fechaNotificacionExpiracionClave;
  135.     /**
  136.      * @ORM\ManyToMany(targetEntity=Cliente::class, inversedBy="usuarios")
  137.      */
  138.     private $clientes;
  139.  
  140.     /**
  141.      * @ORM\Column(type="boolean", nullable=true)
  142.      */
  143.     private $esSoporteProgramador;
  144.     /**
  145.      * @ORM\Column(type="boolean", nullable=true)
  146.      */
  147.     private $esSoporteAutorizador;
  148.     /**
  149.      * @ORM\Column(type="boolean", nullable=true)
  150.      */
  151.     private $puedeCorregirOrdenes;
  152.      /**
  153.      * @ORM\ManyToMany(targetEntity=ClienteFinal::class)
  154.      */
  155.     private $clientesFinales;
  156.     /**
  157.  * @ORM\Column(type="boolean", nullable=true)
  158.  */
  159. private $esEjecutiva;
  160. /**
  161.  * @ORM\Column(type="boolean", nullable=true)
  162.  */
  163. private $puedeAccederAdministracion;
  164. /**
  165.  * @ORM\Column(type="boolean", nullable=true)
  166.  */
  167. private $carteraClientes;
  168. /**
  169.  * @ORM\Column(type="boolean", nullable=true)
  170.  */
  171. private $puedeEliminarOrdenes;
  172. /**
  173.  * @ORM\Column(type="boolean", nullable=true)
  174.  */
  175. private $tieneAccesoSoporte;
  176. /**
  177.  * @ORM\Column(type="boolean", nullable=true)
  178.  */
  179. private $tieneAccesoComercial;
  180. /**
  181.  * @ORM\Column(type="boolean", nullable=true)
  182.  */
  183. private $tieneAccesoDesviacionProveedor;
  184. /**
  185.  * @ORM\Column(type="boolean", nullable=true)
  186.  */
  187. private $puedeCrearDirecciones;
  188. /**
  189.  * @ORM\Column(type="boolean", nullable=true)
  190.  */
  191. private $tieneAccesoLogisticaReversa;
  192. /**
  193.  * @ORM\Column(type="boolean", nullable=true, options={"default": 0})
  194.  */
  195. private $modificarOrden false;
  196. /**
  197.  * @ORM\Column(type="boolean", nullable=true, options={"default": 0})
  198.  */
  199. private $reactivarOrden false;
  200. /**
  201.  * @ORM\Column(type="boolean", nullable=true, options={"default": 0})
  202.  */
  203. private $accesoTemperatura false;
  204. /**
  205.  * @ORM\ManyToOne(targetEntity=Agencia::class)
  206.  */
  207. private $agencia;
  208. /**
  209.  * @ORM\Column(type="boolean", nullable=true)
  210.  */
  211. private $administrarEstadosOrden;
  212. /**
  213.  * @ORM\Column(type="boolean", nullable=true)
  214.  */
  215. private $gopeSiemensDedicado;
  216. /**
  217.  * @ORM\Column(type="boolean", nullable=true)
  218.  */
  219. private $puedeActualizarOrdenes;
  220. public function isModificarOrden(): ?bool
  221. {
  222.     return $this->modificarOrden;
  223. }
  224. public function setModificarOrden(?bool $modificarOrden): self
  225. {
  226.     $this->modificarOrden $modificarOrden;
  227.     return $this;
  228. }
  229. public function isReactivarOrden(): ?bool
  230. {
  231.     return $this->reactivarOrden;
  232. }
  233. public function setReactivarOrden(?bool $reactivarOrden): self
  234. {
  235.     $this->reactivarOrden $reactivarOrden;
  236.     return $this;
  237. }
  238. public function isCarteraClientes(): ?bool
  239. {
  240.     return $this->carteraClientes;
  241. }
  242. public function setCarteraClientes(?bool $carteraClientes): self
  243. {
  244.     $this->carteraClientes $carteraClientes;
  245.     return $this;
  246. }
  247. public function isAccesoTemperatura(): ?bool
  248. {
  249.     return $this->accesoTemperatura;
  250. }
  251. public function setAccesoTemperatura(?bool $accesoTemperatura): self
  252. {
  253.     $this->accesoTemperatura $accesoTemperatura;
  254.     return $this;
  255. }
  256.     public function getDocumentoNameOriginal()
  257.     {
  258.         $docName $this->getDocumentoName();
  259.         if($docName)
  260.         {
  261.             $posName strrpos($docName'-');
  262.             $posExt strrpos($docName'.');
  263.             if($posName && $posExt)
  264.             {
  265.                 $name substr($docName0$posName);
  266.                 $ext substr($docName$posExt);
  267.                 return $name.$ext;
  268.             }
  269.         }
  270.         return $docName;
  271.     }
  272.     
  273.     public function __construct()
  274.     {
  275.         $this->clientes = new ArrayCollection();
  276.         $this->clientesFinales = new ArrayCollection();
  277.     }
  278.     /**
  279.      * If manually uploading a file (i.e. not using Symfony Form) ensure an instance
  280.      * of 'UploadedFile' is injected into this setter to trigger the  update. If this
  281.      * bundle's configuration parameter 'inject_on_load' is set to 'true' this setter
  282.      * must be able to accept an instance of 'File' as the bundle will inject one here
  283.      * during Doctrine hydration.
  284.      *
  285.      * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile $documento
  286.      *
  287.      * @return Product
  288.      */
  289.     public function setDocumentoFile(?File $documento null): void
  290.     {
  291.         $this->documentoFile $documento;
  292.         if ($documento) {
  293.             // It is required that at least one field changes if you are using doctrine
  294.             // otherwise the event listeners won't be called and the file is lost
  295.             $this->fechaActualizacion = new \DateTimeImmutable(null);
  296.         }
  297.     }
  298.     /**
  299.      * @return File|null
  300.      */
  301.     public function getDocumentoFile(): ?File
  302.     {
  303.         return $this->documentoFile;
  304.     }
  305.     public function getDocumentoName(): ?string
  306.     {
  307.         return $this->documentoName;
  308.     }
  309.     public function setDocumentoName(?string $documentoName ""): self
  310.     {
  311.         $this->documentoName $documentoName;
  312.         return $this;
  313.     }
  314.     public function getId(): ?int
  315.     {
  316.         return $this->id;
  317.     }
  318.     /**
  319.      * A visual identifier that represents this user.
  320.      *
  321.      * @see UserInterface
  322.      */
  323.     public function getUsername(): string
  324.     {
  325.         return (string) $this->username;
  326.     }
  327.     public function setUsername($username): self
  328.     {
  329.         $this->username $username;
  330.         return $this;
  331.     }
  332.     /**
  333.      * @see UserInterface
  334.      */
  335.     public function getRoles(): array
  336.     {
  337.         $roles $this->roles;
  338.         // guarantee every user at least has ROLE_USER
  339.         $roles[] = 'ROLE_USER';
  340.         if (in_array('ROLE_CLIENTE'$roles)) {
  341.             foreach($this->getClientes() as $cliente)
  342.             {
  343.                 if($cliente->getPuedeAgregarOrdenes())
  344.                 {
  345.                     $roles[] = 'ROLE_CLIENTE_ORDEN';
  346.                 }
  347.                 if($cliente->getMostrarMatrizTransito())
  348.                 {
  349.                     $roles[] = 'ROLE_CLIENTE_MATRIZ_TRANSITO';
  350.                 }
  351.                 if($cliente->isIntegracionCaribean())
  352.                 {
  353.                     $roles[] = 'ROLE_CARIBEAN';
  354.                 }
  355.                 if($cliente->isIntegracionDhl())
  356.                 {
  357.                     $roles[] = 'ROLE_DHL';
  358.                 }
  359.                 if($cliente->isGrifolsDedicado())
  360.                 {
  361.                     $roles[] = 'ROLE_GRIFOLS_DEDICADO';
  362.                 }
  363.                 if($this->isGopeSiemensDedicado())
  364.                 {
  365.                     $roles[] = 'ROLE_GRIFOLS_DEDICADO';
  366.                     $roles[] = 'ROLE_GOPE_SIEMENS_DEDICADO';
  367.                 }
  368.             }
  369.         }
  370.         if($this->getVerInformeGestionRuta())
  371.         {
  372.             $roles[] = 'ROLE_INFORME_GESTION_RUTA';
  373.         }
  374.         if($this->getGestionarDesviaciones())
  375.         {
  376.             $roles[] = 'ROLE_GESTIONAR_DESVIACIONES';
  377.         }
  378.         if($this->isEsSoporteProgramador())
  379.         {
  380.             $roles[] = 'ROLE_SOPORTE_PROGRAMADOR';
  381.         }
  382.         if($this->isEsSoporteAutorizador())
  383.         {
  384.             $roles[] = 'ROLE_SOPORTE_AUTORIZADOR';
  385.         }
  386.         if($this->isPuedeCorregirOrdenes())
  387.         {
  388.             $roles[] = 'ROLE_CORREGIR_ORDENES';
  389.         }
  390.         elseif($this->isPuedeActualizarOrdenes())
  391.         {
  392.             $roles[] = 'ROLE_ACTUALIZAR_ORDENES';
  393.         }
  394.         
  395.         if($this->getSolicitudRetiro())
  396.         {
  397.             $roles[] = 'ROLE_EJECUTIVA_TRANSFARMA';
  398.         }
  399.         if($this->isPuedeAccederAdministracion())
  400.         {
  401.             $roles[] = 'ROLE_MODULO_ADMINISTRACION';
  402.         }       
  403.         if($this->isPuedeEliminarOrdenes())
  404.         {
  405.             $roles[] = 'ROLE_ELIMINAR_ORDENES';
  406.         }
  407.         if($this->isTieneAccesoSoporte())
  408.         {
  409.             $roles[] = 'ROLE_ACCESO_SOPORTE';
  410.         }
  411.         if($this->isTieneAccesoComercial())
  412.         {
  413.             $roles[] = 'ROLE_ACCESO_COMERCIAL';
  414.         }
  415.         if($this->isTieneAccesoDesviacionProveedor())
  416.         {
  417.             $roles[] = 'ROLE_ACCESO_DESVIACION_PROVEEDOR';
  418.         }
  419.         if($this->isPuedeCrearDirecciones())
  420.         {
  421.             $roles[] = 'ROLE_CREAR_DIRECCIONES';
  422.         }
  423.         if($this->isTieneAccesoLogisticaReversa())
  424.         {
  425.             $roles[] = 'ROLE_ACCESO_LOGISTICA_REVERSA';
  426.         }
  427.         if($this->isAdministrarEstadosOrden())
  428.         {
  429.             $roles[] = 'ROLE_ADMINISTRAR_ESTADO_ORDEN';
  430.         }
  431.         return array_unique($roles);
  432.     }
  433.     public function setRoles(array $roles): self
  434.     {
  435.         $this->roles $roles;
  436.         return $this;
  437.     }
  438.     /**
  439.      * @see UserInterface
  440.      */
  441.     public function getPassword()
  442.     {
  443.         return $this->password;
  444.     }
  445.     /**
  446.      * @see UserInterface
  447.      */
  448.     public function getSalt()
  449.     {
  450.         // not needed for apps that do not check user passwords
  451.     }
  452.     /**
  453.      * @see UserInterface
  454.      */
  455.     public function eraseCredentials()
  456.     {
  457.         // If you store any temporary, sensitive data on the user, clear it here
  458.         // $this->plainPassword = null;
  459.     }
  460.     public function getNomComplet(): ?string
  461.     {
  462.         return $this->nomComplet;
  463.     }
  464.     public function setNomComplet$nomComplet): self
  465.     {
  466.         $this->nomComplet $nomComplet;
  467.         return $this;
  468.     }
  469.     public function getEmail(): ?string
  470.     {
  471.         return $this->email;
  472.     }
  473.     public function setEmail$email): self
  474.     {
  475.         $this->email $email;
  476.         return $this;
  477.     }
  478.     public function isValid(): ?bool
  479.     {
  480.         return $this->valid;
  481.     }
  482.     public function setValid(bool $valid): self
  483.     {
  484.         $this->valid $valid;
  485.         return $this;
  486.     }
  487.     public function isDeleted(): ?bool
  488.     {
  489.         return $this->deleted;
  490.     }
  491.     public function setDeleted(bool $deleted): self
  492.     {
  493.         $this->deleted $deleted;
  494.         return $this;
  495.     }
  496.     public function setPassword($password): self
  497.     {
  498.         $this->password $password;
  499.         return $this;
  500.     }
  501.     function getColorCode() {
  502.         $code dechex(crc32($this->getUsername()));
  503.         $code substr($code06);
  504.         return "#".$code;
  505.     }
  506.     /**
  507.      * @Assert\Callback
  508.      */
  509.     public function validate(ExecutionContextInterface $context$payload)
  510.     {
  511.         /*if (strlen($this->password)< 3){
  512.             $context->buildViolation('Mot de passe trop court')
  513.                 ->atPath('justpassword')
  514.                 ->addViolation();
  515.         }*/
  516.     }
  517.     public function __toString()
  518.     {
  519.         return $this->nomComplet;
  520.     }
  521.     public function isAdmin(): ?bool
  522.     {
  523.         return $this->admin;
  524.     }
  525.     public function setAdmin(bool $admin): self
  526.     {
  527.         $this->admin $admin;
  528.         return $this;
  529.     }
  530.     public function isEqualTo(UserInterface $user)
  531.     {
  532.         if ($user instanceof User)
  533.         return $this->isValid() && !$this->isDeleted() && $this->getPassword() == $user->getPassword() && $this->getUsername() == $user->getUsername()
  534.             && $this->getEmail() == $user->getEmail() ;
  535.     }
  536.     public function getConductor(): ?Conductor
  537.     {
  538.         return $this->conductor;
  539.     }
  540.     public function setConductor(?Conductor $conductor): self
  541.     {
  542.         $this->conductor $conductor;
  543.         return $this;
  544.     }
  545.     public function isEsEjecutiva(): ?bool
  546.     {
  547.         return $this->esEjecutiva;
  548.     }
  549.     public function setEsEjecutiva(?bool $esEjecutiva): self
  550.     {
  551.         $this->esEjecutiva $esEjecutiva;
  552.         return $this;
  553.     }
  554.     public function getVerInformeGestionRuta(): ?bool
  555.     {
  556.         return $this->verInformeGestionRuta;
  557.     }
  558.     public function setVerInformeGestionRuta(?bool $verInformeGestionRuta): self
  559.     {
  560.         $this->verInformeGestionRuta $verInformeGestionRuta;
  561.         return $this;
  562.     }
  563.     public function getGestionarDesviaciones(): ?bool
  564.     {
  565.         return $this->gestionarDesviaciones;
  566.     }
  567.    
  568.     public function setGestionarDesviaciones(?bool $gestionarDesviaciones): self
  569.     {
  570.         $this->gestionarDesviaciones $gestionarDesviaciones;
  571.         return $this;
  572.     }
  573.     
  574.     public function getSolicitudRetiro(): ?bool
  575.     {
  576.         return $this->solicitudRetiro;
  577.     }
  578.     
  579.     public function setSolicitudRetiro(?bool $solicitudRetiro): self
  580.     {
  581.         $this->solicitudRetiro $solicitudRetiro;
  582.         return $this;
  583.     }
  584.     public function getCerrarOrdenes(): ?bool
  585.     {
  586.         return $this->cerrarOrdenes;
  587.     }
  588.     public function setCerrarOrdenes(?bool $cerrarOrdenes): self
  589.     {
  590.         $this->cerrarOrdenes $cerrarOrdenes;
  591.         return $this;
  592.     }
  593.     public function getFechaCreacion(): ?\DateTimeInterface
  594.     {
  595.         return $this->fechaCreacion;
  596.     }
  597.     public function setFechaCreacion(?\DateTimeInterface $fechaCreacion): self
  598.     {
  599.         $this->fechaCreacion $fechaCreacion;
  600.         return $this;
  601.     }
  602.     public function getFechaUltimoLogin(): ?\DateTimeInterface
  603.     {
  604.         return $this->fechaUltimoLogin;
  605.     }
  606.     public function setFechaUltimoLogin(?\DateTimeInterface $fechaUltimoLogin): self
  607.     {
  608.         $this->fechaUltimoLogin $fechaUltimoLogin;
  609.         return $this;
  610.     }
  611.     public function getFechaCambioClave(): ?\DateTimeInterface
  612.     {
  613.         return $this->fechaCambioClave;
  614.     }
  615.     public function setFechaCambioClave(?\DateTimeInterface $fechaCambioClave): self
  616.     {
  617.         $this->fechaCambioClave $fechaCambioClave;
  618.         return $this;
  619.     }
  620.     public function getFechaBloqueoClave(): ?\DateTimeInterface
  621.     {
  622.         return $this->fechaBloqueoClave;
  623.     }
  624.     public function setFechaBloqueoClave(?\DateTimeInterface $fechaBloqueoClave): self
  625.     {
  626.         $this->fechaBloqueoClave $fechaBloqueoClave;
  627.         return $this;
  628.     }
  629.     public function getContadorLoginFallido(): ?int
  630.     {
  631.         return $this->contadorLoginFallido;
  632.     }
  633.     public function setContadorLoginFallido(?int $contadorLoginFallido): self
  634.     {
  635.         $this->contadorLoginFallido $contadorLoginFallido;
  636.         return $this;
  637.     }
  638.     public function getFechaLoginFallido(): ?\DateTimeInterface
  639.     {
  640.         return $this->fechaLoginFallido;
  641.     }
  642.     public function setFechaLoginFallido(?\DateTimeInterface $fechaLoginFallido): self
  643.     {
  644.         $this->fechaLoginFallido $fechaLoginFallido;
  645.         return $this;
  646.     }
  647.     public function getFechaExpiracionClave(): ?\DateTimeInterface
  648.     {
  649.         return $this->fechaExpiracionClave;
  650.     }
  651.     public function setFechaExpiracionClave(?\DateTimeInterface $fechaExpiracionClave): self
  652.     {
  653.         $this->fechaExpiracionClave $fechaExpiracionClave;
  654.         return $this;
  655.     }
  656.     public function getFechaNotificacionExpiracionClave(): ?\DateTimeInterface
  657.     {
  658.         return $this->fechaNotificacionExpiracionClave;
  659.     }
  660.     public function setFechaNotificacionExpiracionClave(?\DateTimeInterface $fechaNotificacionExpiracionClave): self
  661.     {
  662.         $this->fechaNotificacionExpiracionClave $fechaNotificacionExpiracionClave;
  663.         return $this;
  664.     }
  665.     /**
  666.      * @return Collection<int, Cliente>
  667.      */
  668.     public function getClientes(): Collection
  669.     {
  670.         return $this->clientes;
  671.     }
  672.     public function addCliente(Cliente $cliente): self
  673.     {
  674.         if (!$this->clientes->contains($cliente)) {
  675.             $this->clientes[] = $cliente;
  676.         }
  677.         return $this;
  678.     }
  679.     public function removeCliente(Cliente $cliente): self
  680.     {
  681.         $this->clientes->removeElement($cliente);
  682.         return $this;
  683.     }
  684.     public function isEsSoporteProgramador(): ?bool
  685.     {
  686.         return $this->esSoporteProgramador;
  687.     }
  688.     public function setEsSoporteProgramador(?bool $esSoporteProgramador): self
  689.     {
  690.         $this->esSoporteProgramador $esSoporteProgramador;
  691.         return $this;
  692.     }
  693.     public function isEsSoporteAutorizador(): ?bool
  694.     {
  695.         return $this->esSoporteAutorizador;
  696.     }
  697.     public function setEsSoporteAutorizador(?bool $esSoporteAutorizador): self
  698.     {
  699.         $this->esSoporteAutorizador $esSoporteAutorizador;
  700.         return $this;
  701.     }
  702.     public function isPuedeCorregirOrdenes(): ?bool
  703.     {
  704.         return $this->puedeCorregirOrdenes;
  705.     }
  706.     public function setPuedeCorregirOrdenes(?bool $puedeCorregirOrdenes): self
  707.     {
  708.         $this->puedeCorregirOrdenes $puedeCorregirOrdenes;
  709.         return $this;
  710.     }
  711.         /**
  712.      * @return Collection<int, ClienteFinal>
  713.      */
  714.     public function getClientesFinales(): Collection
  715.     {
  716.         return $this->clientesFinales;
  717.     }
  718.     public function addClientesFinale(ClienteFinal $clientesFinale): self
  719.     {
  720.         if (!$this->clientesFinales->contains($clientesFinale)) {
  721.             $this->clientesFinales[] = $clientesFinale;
  722.         }
  723.         return $this;
  724.     }
  725.     public function removeClientesFinale(ClienteFinal $clientesFinale): self
  726.     {
  727.         $this->clientesFinales->removeElement($clientesFinale);
  728.         return $this;
  729.     }
  730.     public function isPuedeAccederAdministracion(): ?bool
  731.     {
  732.         return $this->puedeAccederAdministracion;
  733.     }
  734.     public function setPuedeAccederAdministracion(?bool $puedeAccederAdministracion): self
  735.     {
  736.         $this->puedeAccederAdministracion $puedeAccederAdministracion;
  737.         return $this;
  738.     }
  739.     public function isPuedeEliminarOrdenes(): ?bool
  740.     {
  741.         return $this->puedeEliminarOrdenes;
  742.     }
  743.     public function setPuedeEliminarOrdenes(?bool $puedeEliminarOrdenes): self
  744.     {
  745.         $this->puedeEliminarOrdenes $puedeEliminarOrdenes;
  746.         return $this;
  747.     }
  748.     public function isTieneAccesoSoporte(): ?bool
  749.     {
  750.         return $this->tieneAccesoSoporte;
  751.     }
  752.     public function setTieneAccesoSoporte(?bool $tieneAccesoSoporte): self
  753.     {
  754.         $this->tieneAccesoSoporte $tieneAccesoSoporte;
  755.         return $this;
  756.     }
  757.     public function isTieneAccesoComercial(): ?bool
  758.     {
  759.         return $this->tieneAccesoComercial;
  760.     }
  761.     public function setTieneAccesoComercial(?bool $tieneAccesoComercial): self
  762.     {
  763.         $this->tieneAccesoComercial $tieneAccesoComercial;
  764.         return $this;
  765.     }
  766.     public function isTieneAccesoDesviacionProveedor(): ?bool
  767.     {
  768.         return $this->tieneAccesoDesviacionProveedor;
  769.     }
  770.     public function setTieneAccesoDesviacionProveedor(?bool $tieneAccesoDesviacionProveedor): self
  771.     {
  772.         $this->tieneAccesoDesviacionProveedor $tieneAccesoDesviacionProveedor;
  773.         return $this;
  774.     }
  775.     public function isPuedeCrearDirecciones(): ?bool
  776.     {
  777.         return $this->puedeCrearDirecciones;
  778.     }
  779.     public function setPuedeCrearDirecciones(?bool $puedeCrearDirecciones): self
  780.     {
  781.         $this->puedeCrearDirecciones $puedeCrearDirecciones;
  782.         return $this;
  783.     }
  784.     public function isTieneAccesoLogisticaReversa(): ?bool
  785.     {
  786.         return $this->tieneAccesoLogisticaReversa;
  787.     }
  788.     public function setTieneAccesoLogisticaReversa(?bool $tieneAccesoLogisticaReversa): self
  789.     {
  790.         $this->tieneAccesoLogisticaReversa $tieneAccesoLogisticaReversa;
  791.         return $this;
  792.     }
  793.     public function getAgencia(): ?Agencia
  794.     {
  795.         return $this->agencia;
  796.     }
  797.     public function setAgencia(?Agencia $agencia): self
  798.     {
  799.         $this->agencia $agencia;
  800.         return $this;
  801.     }
  802.     public function isAdministrarEstadosOrden(): ?bool
  803.     {
  804.         return $this->administrarEstadosOrden;
  805.     }
  806.     public function setAdministrarEstadosOrden(?bool $administrarEstadosOrden): self
  807.     {
  808.         $this->administrarEstadosOrden $administrarEstadosOrden;
  809.         return $this;
  810.     }
  811.     public function isGopeSiemensDedicado(): ?bool
  812.     {
  813.         return $this->gopeSiemensDedicado;
  814.     }
  815.     public function setGopeSiemensDedicado(?bool $gopeSiemensDedicado): self
  816.     {
  817.         $this->gopeSiemensDedicado $gopeSiemensDedicado;
  818.         return $this;
  819.     }
  820.     public function isPuedeActualizarOrdenes(): ?bool
  821.     {
  822.         return $this->puedeActualizarOrdenes;
  823.     }
  824.     public function setPuedeActualizarOrdenes(?bool $puedeActualizarOrdenes): self
  825.     {
  826.         $this->puedeActualizarOrdenes $puedeActualizarOrdenes;
  827.         return $this;
  828.     }
  829. }