src/Entity/Ajustes/Usuario.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Ajustes;
  3. use App\Repository\Ajustes\UsuarioRepository;
  4. use App\Traits\ChangesAtTrait;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\Common\Collections\Criteria;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  10. use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
  11. use Symfony\Component\Security\Core\User\UserInterface;
  12. use Symfony\Component\Serializer\Annotation\Groups;
  13. /**
  14.  * @ORM\Entity(repositoryClass=UsuarioRepository::class)
  15.  * @ORM\HasLifecycleCallbacks()
  16.  * @UniqueEntity(fields="email", message="Ya existe otro usuario con este E-mail.")
  17.  */
  18. class Usuario implements UserInterfacePasswordAuthenticatedUserInterface
  19. {
  20.     use ChangesAtTrait;
  21.     public const BASEDIR '/pages/privado/ajustes/usuarios';
  22.     public const BaseDirPerfil 'pages/privado/miperfil';
  23.     public const ICON_CLASS 'fas fa-users-cog';
  24.     public const ICON_CLASS_PASS 'fas fa-key';
  25.     public const ICON '<i class="'.self::ICON_CLASS.'"></i>';
  26.     public const ROLES = [
  27.         'ADMINISTRADOR' => 'ROLE_SUPERADMIN',
  28.         'CLIENTE'       => 'ROLE_CLIENTE',
  29.         'PROFESIONAL'   => 'ROLE_PROFESIONAL',
  30.         'EMPLEADO'      => 'ROLE_EMPLEADO'
  31.     ];
  32.     public const ESTADOS = [
  33.         'user.estados.activo'   => 1,
  34.         'user.estados.inactivo' => 0,
  35.     ];
  36.     
  37.     /**
  38.      * @ORM\Id
  39.      * @ORM\GeneratedValue
  40.      * @ORM\Column(type="integer")
  41.      * @Groups({"Simple"})
  42.      */
  43.     private $id;
  44.     /**
  45.      * @Groups({"Simple"})
  46.      */
  47.     private $text;
  48.     /**
  49.      * @ORM\Column(type="string", length=180, unique=true)
  50.      */
  51.     private $email;
  52.     /**
  53.      * @ORM\Column(type="array")
  54.      */
  55.     private $roles = [];
  56.     /**
  57.      * @var string The hashed password
  58.      * @ORM\Column(type="string", nullable=true)
  59.      */
  60.     private $password;
  61.     /**
  62.      * @ORM\Column(type="boolean")
  63.      */
  64.     private $enabled;
  65.     /**
  66.      * @ORM\Column(type="datetime", nullable=true)
  67.      */
  68.     private $lastLoginAt;
  69.     /**
  70.      * @ORM\Column(type="string", length=100, nullable=true)
  71.      */
  72.     private $lastLoginIp;
  73.     /**
  74.      * @ORM\Column(type="datetime", nullable=true)
  75.      */
  76.     private $passwordChangedAt;
  77.     /**
  78.      * @ORM\Column(type="text", nullable=true)
  79.      */
  80.     private $passwordRecoverToken;
  81.     /**
  82.      * @ORM\Column(type="datetime", nullable=true)
  83.      */
  84.     private $passwordRecoverRequestedAt;
  85.     /**
  86.      * @ORM\Column(type="string", length=40, nullable=true)
  87.      */
  88.     private $passwordRecoverResquestIp;
  89.     /**
  90.      * @ORM\Column(type="datetime", nullable=true)
  91.      */
  92.     private $lastLoginTryAt;
  93.     /**
  94.      * @ORM\Column(type="string", length=100, nullable=true)
  95.      */
  96.     private $lastLoginTryIp;
  97.     /**
  98.      * @ORM\Column(type="text", nullable=true)
  99.      */
  100.     private $observaciones;
  101.     /**
  102.      * @ORM\OneToMany(targetEntity=HistoricoPedido::class, mappedBy="HistCretedBy")
  103.      */
  104.     private $HistoricoPedidos;
  105.     /**
  106.      * @ORM\Column(type="string", length=255, nullable=true)
  107.      */
  108.     private $name;
  109.     /**
  110.      * @ORM\Column(type="string", length=255, nullable=true)
  111.      */
  112.     private $surname;
  113.     /**
  114.      * @ORM\Column(type="string", length=255, nullable=true)
  115.      */
  116.     private $company;
  117.     /**
  118.      * @ORM\Column(type="string", length=255, nullable=true)
  119.      */
  120.     private $language;
  121.     /**
  122.      * @ORM\Column(type="string", length=255, nullable=true)
  123.      */
  124.     private $phone;
  125.     /**
  126.      * @ORM\Column(type="string", length=255, nullable=true)
  127.      */
  128.     private $phonePre;
  129.     /**
  130.      * @ORM\OneToMany(targetEntity=Gradeada::class, mappedBy="GradCliente")
  131.      */
  132.     private $UsuGradeada;
  133.     /**
  134.      * @ORM\OneToMany(targetEntity=Direccion::class, mappedBy="DirUser", cascade={"persist", "remove"}, orphanRemoval=true)
  135.      */
  136.     private $direcciones;
  137.     /**
  138.      * @ORM\OneToMany(targetEntity=UsuarioValidacionEmail::class, mappedBy="idUser", cascade={"persist", "remove"}, orphanRemoval=true)
  139.      */
  140.     private $UsuEmailValidation;
  141.     /**
  142.     * @ORM\Column(type="boolean", nullable=true)
  143.     */
  144.     private $correoVerificado;
  145.     private $FullName;
  146.     private $FullPhone;
  147.     /**
  148.      * @ORM\Column(type="string", length=255, nullable=true)
  149.      */
  150.     private $UsuDni;
  151.     /**
  152.      * @ORM\OneToMany(targetEntity=Pedido::class, mappedBy="PedUsuario", cascade={"persist", "remove"})
  153.      */
  154.     private $UsuPedidos;
  155.     /**
  156.      * @ORM\OneToMany(targetEntity=Descuento::class, mappedBy="DesUsuario")
  157.      */
  158.     private $UsuCodDescuentos;
  159.     /**
  160.      * @ORM\Column(type="text", nullable=true)
  161.      */
  162.     private $UsuComentarioDescuento;
  163.     /**
  164.      * @ORM\Column(type="text", nullable=true)
  165.      */
  166.     private $UsuAlbumToken;
  167.     /**
  168.      * @ORM\OneToMany(targetEntity=HistComisiones::class, mappedBy="HistComPedUsuario")
  169.      */
  170.     private $UsuPedidoHistComisiones;
  171.     /**
  172.      * @ORM\OneToMany(targetEntity=HistComisiones::class, mappedBy="HistComUsuario", cascade={"persist","remove"} )
  173.      */
  174.     private $UsuHistComisiones;
  175.     /**
  176.      * @ORM\Column(type="string", nullable=true)
  177.      */
  178.     private $UsuOldId;
  179.     /**
  180.      * @ORM\Column(type="string", length=255, nullable=true)
  181.      */
  182.     private $UsuOldPassword;
  183.     /**
  184.      * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  185.      */
  186.     private $UsuDesServicios;
  187.     /**
  188.      * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  189.      */
  190.     private $UsuDesProductos;
  191.     /**
  192.      * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  193.      */
  194.     private $UsuDesEnvio;
  195.     /**
  196.      * @ORM\OneToMany(targetEntity=Gradeada::class, mappedBy="GradLotesRecBy")
  197.      */
  198.     private $UsuGradLotesRecCartas;
  199.     /**
  200.      * @ORM\OneToMany(targetEntity=Gradeada::class, mappedBy="GradLotesEnvBy")
  201.      */
  202.     private $UsuGradLotesEnvCartas;
  203.     public function __construct()
  204.     {
  205.         $this->createdAt = new \DateTime();
  206.         $this->enabled true;
  207.         $this->correoVerificado false;
  208.         $this->HistoricoPedidos = new ArrayCollection();
  209.         $this->UsuGradeada = new ArrayCollection();
  210.         $this->direcciones = new ArrayCollection();
  211.         $this->UsuEmailValidation = new ArrayCollection();
  212.         $this->UsuPedidos = new ArrayCollection();
  213.         $this->UsuCodDescuentos = new ArrayCollection();
  214.         $this->UsuPedidoHistComisiones = new ArrayCollection();
  215.         $this->UsuHistComisiones = new ArrayCollection();
  216.         $this->UsuGradLotesRecCartas = new ArrayCollection();
  217.         $this->UsuGradLotesEnvCartas = new ArrayCollection();
  218.     }
  219.     public function __toString(): string
  220.     {
  221.         return (string) $this->email;
  222.     }
  223.     public function getFullName(): string
  224.     {
  225.         return (string) ($this->getName() ? $this->getName() : '').' '.($this->getSurname() ? $this->getSurname() : '');
  226.     }
  227.     public function getFullPhone(): string
  228.     {
  229.         if (str_starts_with($this->getPhonePre(), '+')){
  230.             return (string) ($this->getPhonePre() ? $this->getPhonePre() : '').' '.($this->getPhone() ? $this->getPhone() : '');
  231.         }else{
  232.             return (string) '+'.($this->getPhonePre() ? $this->getPhonePre() : '').' '.($this->getPhone() ? $this->getPhone() : '');
  233.         }
  234.         
  235.     }
  236.     /**
  237.      * @ORM\PreUpdate
  238.      */
  239.     public function onUpdateEntity()
  240.     {
  241.         $this->updatedAt = new \DateTime();
  242.     }
  243.     public function reset(): self
  244.     {
  245.         $this->createdAt = new \DateTime();
  246.         $this->updatedAt null;
  247.         $this->email null;
  248.         return $this;
  249.     }
  250.     public function getId(): ?int
  251.     {
  252.         return $this->id;
  253.     }
  254.     public function getText(): string
  255.     {
  256.         return (string) $this->__toString();
  257.     }
  258.     public function getEmail(): ?string
  259.     {
  260.         return $this->email;
  261.     }
  262.     public function setEmail(string $email): self
  263.     {
  264.         $this->email $email;
  265.         return $this;
  266.     }
  267.     /**
  268.      * A visual identifier that represents this user.
  269.      *
  270.      * @see UserInterface
  271.      */
  272.     public function getUserIdentifier(): string
  273.     {
  274.         return (string) $this->email;
  275.     }
  276.     /**
  277.      * @see UserInterface
  278.      */
  279.     public function getRoles(): array
  280.     {
  281.         $roles $this->roles;
  282.         // guarantee every user at least has ROLE_USER
  283.         $roles[] = 'ROLE_USER';
  284.         return array_unique($roles);
  285.     }
  286.     public function setRoles(array $roles): self
  287.     {
  288.         $this->roles $roles;
  289.         return $this;
  290.     }
  291.     /**
  292.      * @see PasswordAuthenticatedUserInterface
  293.      */
  294.     public function getPassword(): string
  295.     {
  296.         return $this->password;
  297.     }
  298.     public function setPassword(?string $password): self
  299.     {
  300.         $this->password $password;
  301.         return $this;
  302.     }
  303.     /**
  304.      * Returning a salt is only needed, if you are not using a modern
  305.      * hashing algorithm (e.g. bcrypt or sodium) in your security.yaml.
  306.      *
  307.      * @see UserInterface
  308.      */
  309.     public function getSalt(): ?string
  310.     {
  311.         return null;
  312.     }
  313.     /**
  314.      * @see UserInterface
  315.      */
  316.     public function eraseCredentials()
  317.     {
  318.         // If you store any temporary, sensitive data on the user, clear it here
  319.         // $this->plainPassword = null;
  320.     }
  321.     public function getEnabled(): ?bool
  322.     {
  323.         return $this->enabled;
  324.     }
  325.     public function getEnabledTag(string $text ''): string
  326.     {
  327.         return $this->enabled ?
  328.             '<span class="badge badge-light-success">'.$text.'</span>' :
  329.             '<span class="badge badge-light-danger">'.$text.'</span>'
  330.         ;
  331.     }
  332.     public function getEnabledText(): string
  333.     {
  334.         return false === array_search($this->enabledself::ESTADOS) ? 'user.estados.none' array_search($this->enabledself::ESTADOS);
  335.     }
  336.     public function isEnabled(): bool
  337.     {
  338.         return true == (bool) $this->enabled;
  339.     }
  340.     public function setEnabled(bool $enabled): self
  341.     {
  342.         $this->enabled $enabled;
  343.         return $this;
  344.     }
  345.     public function getLastLoginAt(): ?\DateTimeInterface
  346.     {
  347.         return $this->lastLoginAt;
  348.     }
  349.     public function setLastLoginAt(?\DateTimeInterface $lastLoginAt): self
  350.     {
  351.         $this->lastLoginAt $lastLoginAt;
  352.         return $this;
  353.     }
  354.     public function getLastLoginIp(): ?string
  355.     {
  356.         return $this->lastLoginIp;
  357.     }
  358.     public function setLastLoginIp(?string $lastLoginIp): self
  359.     {
  360.         $this->lastLoginIp $lastLoginIp;
  361.         return $this;
  362.     }
  363.     public function getPasswordChangedAt(): ?\DateTimeInterface
  364.     {
  365.         return $this->passwordChangedAt;
  366.     }
  367.     public function setPasswordChangedAt(?\DateTimeInterface $passwordChangedAt): self
  368.     {
  369.         $this->passwordChangedAt $passwordChangedAt;
  370.         return $this;
  371.     }
  372.     public function getPasswordRecoverToken(): ?string
  373.     {
  374.         return $this->passwordRecoverToken;
  375.     }
  376.     public function setPasswordRecoverToken(?string $passwordRecoverToken): self
  377.     {
  378.         $this->passwordRecoverToken $passwordRecoverToken;
  379.         return $this;
  380.     }
  381.     public function getPasswordRecoverRequestedAt(): ?\DateTimeInterface
  382.     {
  383.         return $this->passwordRecoverRequestedAt;
  384.     }
  385.     public function setPasswordRecoverRequestedAt(?\DateTimeInterface $passwordRecoverRequestedAt): self
  386.     {
  387.         $this->passwordRecoverRequestedAt $passwordRecoverRequestedAt;
  388.         return $this;
  389.     }
  390.     public function getPasswordRecoverResquestIp(): ?string
  391.     {
  392.         return $this->passwordRecoverResquestIp;
  393.     }
  394.     public function setPasswordRecoverResquestIp(?string $passwordRecoverResquestIp): self
  395.     {
  396.         $this->passwordRecoverResquestIp $passwordRecoverResquestIp;
  397.         return $this;
  398.     }
  399.     public function getLastLoginTryAt(): ?\DateTimeInterface
  400.     {
  401.         return $this->lastLoginTryAt;
  402.     }
  403.     public function setLastLoginTryAt(?\DateTimeInterface $lastLoginTryAt): self
  404.     {
  405.         $this->lastLoginTryAt $lastLoginTryAt;
  406.         return $this;
  407.     }
  408.     public function getLastLoginTryIp(): ?string
  409.     {
  410.         return $this->lastLoginTryIp;
  411.     }
  412.     public function setLastLoginTryIp(?string $lastLoginTryIp): self
  413.     {
  414.         $this->lastLoginTryIp $lastLoginTryIp;
  415.         return $this;
  416.     }
  417.     public function getObservaciones(): ?string
  418.     {
  419.         return $this->observaciones;
  420.     }
  421.     public function setObservaciones(?string $observaciones): self
  422.     {
  423.         $this->observaciones $observaciones;
  424.         return $this;
  425.     }
  426.     /**
  427.      * @return Collection<int, HistoricoPedido>
  428.      */
  429.     public function getHistoricoPedidos(): Collection
  430.     {
  431.         return $this->HistoricoPedidos;
  432.     }
  433.     public function addHistoricoPedido(HistoricoPedido $historicoPedido): self
  434.     {
  435.         if (!$this->HistoricoPedidos->contains($historicoPedido)) {
  436.             $this->HistoricoPedidos[] = $historicoPedido;
  437.             $historicoPedido->setHistCretedBy($this);
  438.         }
  439.         return $this;
  440.     }
  441.     public function removeHistoricoPedido(HistoricoPedido $historicoPedido): self
  442.     {
  443.         if ($this->HistoricoPedidos->removeElement($historicoPedido)) {
  444.             // set the owning side to null (unless already changed)
  445.             if ($historicoPedido->getHistCretedBy() === $this) {
  446.                 $historicoPedido->setHistCretedBy(null);
  447.             }
  448.         }
  449.         return $this;
  450.     }
  451.     public function getName(): ?string
  452.     {
  453.         return $this->name;
  454.     }
  455.     public function setName(?string $name): self
  456.     {
  457.         $this->name $name;
  458.         return $this;
  459.     }
  460.     public function getSurname(): ?string
  461.     {
  462.         return $this->surname;
  463.     }
  464.     public function setSurname(?string $surname): self
  465.     {
  466.         $this->surname $surname;
  467.         return $this;
  468.     }
  469.     public function getCompany(): ?string
  470.     {
  471.         return $this->company;
  472.     }
  473.     public function setCompany(?string $company): self
  474.     {
  475.         $this->company $company;
  476.         return $this;
  477.     }
  478.     public function getLanguage(): ?string
  479.     {
  480.         return $this->language;
  481.     }
  482.     public function setLanguage(?string $language): self
  483.     {
  484.         $this->language $language;
  485.         return $this;
  486.     }
  487.     public function getPhone(): ?string
  488.     {
  489.         return $this->phone;
  490.     }
  491.     public function setPhone(?string $phone): self
  492.     {
  493.         $this->phone $phone;
  494.         return $this;
  495.     }
  496.     public function getPhonePre(): ?string
  497.     {
  498.         return $this->phonePre;
  499.     }
  500.     public function setPhonePre(?string $phonePre): self
  501.     {
  502.         $this->phonePre $phonePre;
  503.         return $this;
  504.     }
  505.     /**
  506.      * @return Collection<int, Gradeada>
  507.      */
  508.     public function getUsuGradeada(): Collection
  509.     {
  510.         return $this->UsuGradeada;
  511.     }
  512.     public function addUsuGradeada(Gradeada $usuGradeada): self
  513.     {
  514.         if (!$this->UsuGradeada->contains($usuGradeada)) {
  515.             $this->UsuGradeada[] = $usuGradeada;
  516.             $usuGradeada->setGradCliente($this);
  517.         }
  518.         return $this;
  519.     }
  520.     public function removeUsuGradeada(Gradeada $usuGradeada): self
  521.     {
  522.         if ($this->UsuGradeada->removeElement($usuGradeada)) {
  523.             // set the owning side to null (unless already changed)
  524.             if ($usuGradeada->getGradCliente() === $this) {
  525.                 $usuGradeada->setGradCliente(null);
  526.             }
  527.         }
  528.         return $this;
  529.     }
  530.     /**
  531.      * @return Collection<int, Direccion>
  532.      */
  533.     public function getDirecciones(): Collection
  534.     {
  535.         return $this->direcciones;
  536.     }
  537.     public function addDireccione(Direccion $direccione): self
  538.     {
  539.         if (!$this->direcciones->contains($direccione)) {
  540.             $this->direcciones[] = $direccione;
  541.             $direccione->setDirUser($this);
  542.         }
  543.         return $this;
  544.     }
  545.     public function removeDireccione(Direccion $direccione): self
  546.     {
  547.         if ($this->direcciones->removeElement($direccione)) {
  548.             // set the owning side to null (unless already changed)
  549.             if ($direccione->getDirUser() === $this) {
  550.                 $direccione->setDirUser(null);
  551.             }
  552.         }
  553.         return $this;
  554.     }
  555.     public function getUsuarioValidacionEmailsFilter(?int $page 1, ?int $limit 12, ?array $order = [], ?array $data = []): Collection
  556.     {
  557.         $criteria Criteria::create();
  558.         $page = (null === $page : ($page $page $page));
  559.         $limit = (null === $limit 12 $limit);
  560.         $order = (null === $order ? [] : $order);
  561.         $data = (null === $data ? [] : $data);
  562.         if (count($data) > 0) {
  563.             if (isset($data['horas'])) {
  564.                 $criteria->where(
  565.                     Criteria::expr()->gte('created', (new \Datetime(' -'.$data['horas'].'hour')))
  566.                 );
  567.             }
  568.         }
  569.         if ($page && $limit 0) {
  570.             $criteria->setFirstResult($page)->setMaxResults($limit);
  571.         }
  572.         if (count($order) > 0) {
  573.             $criteria->orderBy($order);
  574.         }
  575.         return $this->UsuEmailValidation->matching($criteria);
  576.     }
  577.     /**
  578.      * @return Collection<int, UsuarioValidacionEmail>
  579.      */
  580.     public function getUsuEmailValidation(): Collection
  581.     {
  582.         return $this->UsuEmailValidation;
  583.     }
  584.     public function addUsuEmailValidation(UsuarioValidacionEmail $usuEmailValidation): self
  585.     {
  586.         if (!$this->UsuEmailValidation->contains($usuEmailValidation)) {
  587.             $this->UsuEmailValidation[] = $usuEmailValidation;
  588.             $usuEmailValidation->setIdUser($this);
  589.         }
  590.         return $this;
  591.     }
  592.     public function removeUsuEmailValidation(UsuarioValidacionEmail $usuEmailValidation): self
  593.     {
  594.         if ($this->UsuEmailValidation->removeElement($usuEmailValidation)) {
  595.             // set the owning side to null (unless already changed)
  596.             if ($usuEmailValidation->getIdUser() === $this) {
  597.                 $usuEmailValidation->setIdUser(null);
  598.             }
  599.         }
  600.         return $this;
  601.     }
  602.     
  603.     public function getCorreoVerificado(): ?bool
  604.     {
  605.         return $this->correoVerificado;
  606.     }
  607.     public function setCorreoVerificado(bool $correoVerificado): self
  608.     {
  609.         $this->correoVerificado $correoVerificado;
  610.         return $this;
  611.     }
  612.     public function getUsuDni(): ?string
  613.     {
  614.         return $this->UsuDni;
  615.     }
  616.     public function setUsuDni(?string $UsuDni): self
  617.     {
  618.         $this->UsuDni $UsuDni;
  619.         return $this;
  620.     }
  621.     /**
  622.      * @return Collection<int, Pedido>
  623.      */
  624.     public function getUsuPedidos(): Collection
  625.     {
  626.         return $this->UsuPedidos;
  627.     }
  628.     public function addUsPedido(Pedido $usPedido): self
  629.     {
  630.         if (!$this->UsuPedidos->contains($usPedido)) {
  631.             $this->UsuPedidos[] = $usPedido;
  632.             $usPedido->setPedUsuario($this);
  633.         }
  634.         return $this;
  635.     }
  636.     public function removeUsPedido(Pedido $usPedido): self
  637.     {
  638.         if ($this->UsuPedidos->removeElement($usPedido)) {
  639.             // set the owning side to null (unless already changed)
  640.             if ($usPedido->getPedUsuario() === $this) {
  641.                 $usPedido->setPedUsuario(null);
  642.             }
  643.         }
  644.         return $this;
  645.     }
  646.     /**
  647.      * @return Collection<int, Descuento>
  648.      */
  649.     public function getUsuCodDescuentos(): Collection
  650.     {
  651.         return $this->UsuCodDescuentos;
  652.     }
  653.     public function addUsuCodDescuento(Descuento $usuCodDescuento): self
  654.     {
  655.         if (!$this->UsuCodDescuentos->contains($usuCodDescuento)) {
  656.             $this->UsuCodDescuentos[] = $usuCodDescuento;
  657.             $usuCodDescuento->setDesUsuario($this);
  658.         }
  659.         return $this;
  660.     }
  661.     public function removeUsuCodDescuento(Descuento $usuCodDescuento): self
  662.     {
  663.         if ($this->UsuCodDescuentos->removeElement($usuCodDescuento)) {
  664.             // set the owning side to null (unless already changed)
  665.             if ($usuCodDescuento->getDesUsuario() === $this) {
  666.                 $usuCodDescuento->setDesUsuario(null);
  667.             }
  668.         }
  669.         return $this;
  670.     }
  671.     public function getUsuComentarioDescuento(): ?string
  672.     {
  673.         return $this->UsuComentarioDescuento;
  674.     }
  675.     public function setUsuComentarioDescuento(?string $UsuComentarioDescuento): self
  676.     {
  677.         $this->UsuComentarioDescuento $UsuComentarioDescuento;
  678.         return $this;
  679.     }
  680.     public function getUsuAlbumToken(): ?string
  681.     {
  682.         return $this->UsuAlbumToken;
  683.     }
  684.     public function setUsuAlbumToken(?string $UsuAlbumToken): self
  685.     {
  686.         $this->UsuAlbumToken $UsuAlbumToken;
  687.         return $this;
  688.     }
  689.     /**
  690.      * @return Collection<int, HistComisiones>
  691.      */
  692.     public function getUsuPedidoHistComisiones(): Collection
  693.     {
  694.         return $this->UsuPedidoHistComisiones;
  695.     }
  696.     public function addUsuPedidoHistComisione(HistComisiones $usuPedidoHistComisione): self
  697.     {
  698.         if (!$this->UsuPedidoHistComisiones->contains($usuPedidoHistComisione)) {
  699.             $this->UsuPedidoHistComisiones[] = $usuPedidoHistComisione;
  700.             $usuPedidoHistComisione->setHistComPedUsuario($this);
  701.         }
  702.         return $this;
  703.     }
  704.     public function removeUsuPedidoHistComisione(HistComisiones $usuPedidoHistComisione): self
  705.     {
  706.         if ($this->UsuPedidoHistComisiones->removeElement($usuPedidoHistComisione)) {
  707.             // set the owning side to null (unless already changed)
  708.             if ($usuPedidoHistComisione->getHistComPedUsuario() === $this) {
  709.                 $usuPedidoHistComisione->setHistComPedUsuario(null);
  710.             }
  711.         }
  712.         return $this;
  713.     }
  714.     /**
  715.      * @return Collection<int, HistComisiones>
  716.      */
  717.     public function getUsuHistComisiones(): Collection
  718.     {
  719.         return $this->UsuHistComisiones;
  720.     }
  721.     public function addUsuHistComisione(HistComisiones $usuHistComisione): self
  722.     {
  723.         if (!$this->UsuHistComisiones->contains($usuHistComisione)) {
  724.             $this->UsuHistComisiones[] = $usuHistComisione;
  725.             $usuHistComisione->setHistComUsuario($this);
  726.         }
  727.         return $this;
  728.     }
  729.     public function removeUsuHistComisione(HistComisiones $usuHistComisione): self
  730.     {
  731.         if ($this->UsuHistComisiones->removeElement($usuHistComisione)) {
  732.             // set the owning side to null (unless already changed)
  733.             if ($usuHistComisione->getHistComUsuario() === $this) {
  734.                 $usuHistComisione->setHistComUsuario(null);
  735.             }
  736.         }
  737.         return $this;
  738.     }
  739.     public function getUsuOldId(): ?string
  740.     {
  741.         return $this->UsuOldId;
  742.     }
  743.     public function setUsuOldId(?string $UsuOldId): self
  744.     {
  745.         $this->UsuOldId $UsuOldId;
  746.         return $this;
  747.     }
  748.     public function getUsuOldPassword(): ?string
  749.     {
  750.         return $this->UsuOldPassword;
  751.     }
  752.     public function setUsuOldPassword(?string $UsuOldPassword): self
  753.     {
  754.         $this->UsuOldPassword $UsuOldPassword;
  755.         return $this;
  756.     }
  757.     public function getUsuDesServicios(): ?string
  758.     {
  759.         return $this->UsuDesServicios;
  760.     }
  761.     public function setUsuDesServicios(?string $UsuDesServicios): self
  762.     {
  763.         $this->UsuDesServicios $UsuDesServicios;
  764.         return $this;
  765.     }
  766.     public function getUsuDesProductos(): ?string
  767.     {
  768.         return $this->UsuDesProductos;
  769.     }
  770.     public function setUsuDesProductos(?string $UsuDesProductos): self
  771.     {
  772.         $this->UsuDesProductos $UsuDesProductos;
  773.         return $this;
  774.     }
  775.     public function getUsuDesEnvio(): ?string
  776.     {
  777.         return $this->UsuDesEnvio;
  778.     }
  779.     public function setUsuDesEnvio(?string $UsuDesEnvio): self
  780.     {
  781.         $this->UsuDesEnvio $UsuDesEnvio;
  782.         return $this;
  783.     }
  784.     /**
  785.      * @return Collection<int, Gradeada>
  786.      */
  787.     public function getUsuGradLotesRecCartas(): Collection
  788.     {
  789.         return $this->UsuGradLotesRecCartas;
  790.     }
  791.     public function addUsuGradLotesRecCarta(Gradeada $usuGradLotesRecCarta): self
  792.     {
  793.         if (!$this->UsuGradLotesRecCartas->contains($usuGradLotesRecCarta)) {
  794.             $this->UsuGradLotesRecCartas[] = $usuGradLotesRecCarta;
  795.             $usuGradLotesRecCarta->setGradLotesRecBy($this);
  796.         }
  797.         return $this;
  798.     }
  799.     public function removeUsuGradLotesRecCarta(Gradeada $usuGradLotesRecCarta): self
  800.     {
  801.         if ($this->UsuGradLotesRecCartas->removeElement($usuGradLotesRecCarta)) {
  802.             // set the owning side to null (unless already changed)
  803.             if ($usuGradLotesRecCarta->getGradLotesRecBy() === $this) {
  804.                 $usuGradLotesRecCarta->setGradLotesRecBy(null);
  805.             }
  806.         }
  807.         return $this;
  808.     }
  809.     /**
  810.      * @return Collection<int, Gradeada>
  811.      */
  812.     public function getUsuGradLotesEnvCartas(): Collection
  813.     {
  814.         return $this->UsuGradLotesEnvCartas;
  815.     }
  816.     public function addUsuGradLotesEnvCarta(Gradeada $usuGradLotesEnvCarta): self
  817.     {
  818.         if (!$this->UsuGradLotesEnvCartas->contains($usuGradLotesEnvCarta)) {
  819.             $this->UsuGradLotesEnvCartas[] = $usuGradLotesEnvCarta;
  820.             $usuGradLotesEnvCarta->setGradLotesEnvBy($this);
  821.         }
  822.         return $this;
  823.     }
  824.     public function removeUsuGradLotesEnvCarta(Gradeada $usuGradLotesEnvCarta): self
  825.     {
  826.         if ($this->UsuGradLotesEnvCartas->removeElement($usuGradLotesEnvCarta)) {
  827.             // set the owning side to null (unless already changed)
  828.             if ($usuGradLotesEnvCarta->getGradLotesEnvBy() === $this) {
  829.                 $usuGradLotesEnvCarta->setGradLotesEnvBy(null);
  830.             }
  831.         }
  832.         return $this;
  833.     }
  834. }