src/Entity/Users.php line 38

  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Event\PreUpdateEventArgs;
  4. use Doctrine\ORM\Mapping\Id;
  5. use Doctrine\ORM\Mapping\Index;
  6. use Doctrine\ORM\Mapping\Entity;
  7. use Doctrine\ORM\Mapping\Table;
  8. use Doctrine\ORM\Mapping\Column;
  9. use Doctrine\ORM\Mapping\JoinColumn;
  10. use Doctrine\ORM\Mapping\ManyToOne;
  11. use Doctrine\ORM\Mapping\OneToOne;
  12. use Doctrine\ORM\Mapping\OneToMany;
  13. use Doctrine\ORM\Mapping\GeneratedValue;
  14. use Doctrine\ORM\Mapping\HasLifecycleCallbacks;
  15. use Doctrine\ORM\Mapping\PrePersist;
  16. use Doctrine\ORM\Mapping\PreUpdate;
  17. use Symfony\Component\Validator\Constraints as Assert;
  18. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  19. use Symfony\Component\Security\Core\User\UserInterface;
  20. use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
  21. /**
  22.  * Users
  23.  *
  24.  *
  25.  */
  26. #[HasLifecycleCallbacks]
  27. #[UniqueEntity(fields'mobileNumber'message'mobile number already taken')]
  28. #[UniqueEntity(fields'username'message'identification number is already exist')]
  29. #[Entity(repositoryClassUsersRepository::class)]
  30. #[Table(name'users')]
  31. #[Index(name'users_companies_fk'columns: ['company_id'])]
  32. #[Index(name'users_category_fk'columns: ['category_id'])]
  33. #[Index(name'users_created_fk'columns: ['created_by'])]
  34. class Users implements UserInterfacePasswordAuthenticatedUserInterface
  35. {
  36.     /**
  37.      * @var string
  38.      */
  39.     #[Column(name'user_id'type'guid'length36nullablefalse)]
  40.     #[Id]
  41.     #[GeneratedValue(strategy'UUID')]
  42.     private $userId;
  43.     /**
  44.      * @var string
  45.      *
  46.      */
  47.     #[Column(name'username'type'string'length50nullabletrue)]
  48.     private $username;
  49.     /**
  50.      * @var string
  51.      */
  52.     #[Column(name'password'type'string'length64nullabletrue)]
  53.     private $password;
  54.     /**
  55.      * @var string
  56.      */
  57.     #[Column(name'telephone'type'string'length20nullabletrue)]
  58.     private $telephone;
  59.     /**
  60.      * @var array
  61.      */
  62.     #[Column(name'roles'type'array')]
  63.     private $roles = array('ROLE_USER');
  64.     /**
  65.      * available roles.
  66.      */
  67.     const ROLES = [
  68.         'ROLE_USER'                 => 'ROLE_USER',
  69.         'ROLE_NOT_USER'             => 'ROLE_NOT_USER',
  70.         'ROLE_CUSTOMER_CARE'        => 'ROLE_CUSTOMER_CARE',
  71.         'ROLE_FOLLOW_UP_OFFICER'    => 'ROLE_FOLLOW_UP_OFFICER',
  72.         'ROLE_AUCTION_EDITOR'       => 'ROLE_AUCTION_EDITOR',
  73.         'ROLE_VEHICLES_ADMIN'       => 'ROLE_VEHICLES_ADMIN',
  74.         'ROLE_PROFILES_EDITOR'      => 'ROLE_PROFILES_EDITOR',
  75.         'ROLE_ACCOUNTANT'           => 'ROLE_ACCOUNTANT',
  76.         'ROLE_TRANSPORT_OFFICER'    => 'ROLE_TRANSPORT_OFFICER',
  77.         'ROLE_VEHICLES_TECHNICIAN'  => 'ROLE_VEHICLES_TECHNICIAN',
  78.         'ROLE_DATA_ADMIN'           => 'ROLE_DATA_ADMIN',
  79.         'ROLE_ACCOUNT_MANAGER'      => 'ROLE_ACCOUNT_MANAGER',
  80.         'ROLE_BENEFICIARY_REP'      => 'ROLE_BENEFICIARY_REP',
  81.         'ROLE_ADMIN'                => 'ROLE_ADMIN',
  82.         'ROLE_SUPER_ADMIN'          => 'ROLE_SUPER_ADMIN',
  83.         'ROLE_PROFILES_ADMIN'       => 'ROLE_PROFILES_ADMIN',
  84.         'ROLE_SUPER_USER'           => 'ROLE_SUPER_USER'
  85.     ];
  86.     /**
  87.      * @var string
  88.      */
  89.     #[Column(name'mobile_number'type'string'length20nullabletrue)]
  90.     private $mobileNumber;
  91.     /**
  92.      * @var string
  93.      */
  94.     #[Column(name'mobile_number2'type'string'length20nullabletrue)]
  95.     private $mobileNumber2;
  96.     /**
  97.      * @var boolean
  98.      *
  99.      *
  100.      */
  101.     #[Column(name'is_mobile_number2_verified'type'boolean'nullablefalse)]
  102.     private $isMobileNumber2Verified ;
  103.     /**
  104.      * @var string
  105.      */
  106.     #[Column(name'email'type'string'length50nullabletrue)]
  107.     private $email;
  108.     /**
  109.      * @var boolean
  110.      */
  111.     #[Column(name'email_verified'type'boolean'nullablefalse)]
  112.     private $emailVerified 0;
  113.     /**
  114.      * @var string
  115.      */
  116.     #[Column(name'verify_token'type'string'length100nullabletrue)]
  117.     private $verify_token;
  118.     /**
  119.      * @var float
  120.      */
  121.     #[Column(name'balance'type'float'precision10scale0nullabletrue)]
  122.     private $balance;
  123.     /**
  124.      * @var float
  125.      */
  126.     #[Column(name'locked_ot_security'type'float'precision10scale0nullabletrue)]
  127.     private $lockedOtSecurity;
  128.     /**
  129.      * @var boolean
  130.      */
  131.     #[Column(name'is_verified'type'boolean'nullablefalse)]
  132.     private $isVerified 0;
  133.     /**
  134.      * @var boolean
  135.      */
  136.     #[Column(name'is_deleted'type'boolean'nullablefalse)]
  137.     private $isDeleted 0;
  138.     
  139.     /**
  140.      * @var boolean
  141.      */
  142.     #[Column(name'is_receive_sms'type'boolean'nullablefalse)]
  143.     private $isReceiveSms false;
  144.     /**
  145.      * @var \DateTime
  146.      */
  147.     #[Column(name'last_login'type'datetime'nullabletrue)]
  148.     private $lastLogin;
  149.     /**
  150.      * @var \DateTime
  151.      */
  152.     #[Column(name'created_at'type'datetime'nullabletrue)]
  153.     private $createdAt;
  154.     /**
  155.      * @var \DateTime
  156.      */
  157.     #[Column(name'updated_at'type'datetime'nullabletrue)]
  158.     private $updatedAt;
  159.     /**
  160.      * @var UsersCategories
  161.      */
  162.     #[ManyToOne(targetEntity\UsersCategories::class)]
  163.     #[JoinColumn(name'category_id'referencedColumnName'category_id')]
  164.     private $category;
  165.     /**
  166.      * @var Companies
  167.      */
  168.     #[ManyToOne(targetEntity\Companies::class)]
  169.     #[JoinColumn(name'company_id'referencedColumnName'company_id')]
  170.     private $company;
  171.     /**
  172.      * @var Users
  173.      */
  174.     #[ManyToOne(targetEntity\Users::class)]
  175.     #[JoinColumn(name'created_by'referencedColumnName'user_id')]
  176.     private $createdBy;
  177.     /**
  178.      * @var Users
  179.      */
  180.     #[ManyToOne(targetEntity\Users::class)]
  181.     #[JoinColumn(name'updated_by'referencedColumnName'user_id')]
  182.     private $updatedBy;
  183.     /**
  184.      * @var UserIdentityInfo
  185.      */
  186.     #[OneToOne(targetEntity\UserIdentityInfo::class, mappedBy'user'cascade: ['persist'])]
  187.     #[Assert\Valid(groups: ['ProfileValidation'])]
  188.     private $userIdentityInfo;
  189.     /**
  190.      * @var UserAdditionalDetails
  191.      */
  192.     #[OneToOne(targetEntity\UserAdditionalDetails::class, mappedBy'user'cascade: ['persist'])]
  193.     private $userAdditionalDetails;
  194.     #[OneToMany(targetEntity\App\Entity\UserBankDetails::class, mappedBy'user')]
  195.     private $bankAccounts;
  196.     /**
  197.      * @var string
  198.      */
  199.     #[Column(name'profile_origin'type'string'nullabletruecolumnDefinition"enum('self registered','created','imported')")]
  200.     private $profileOrigin;
  201.     /**
  202.      * @var string
  203.      */
  204.     #[Column(name'signature_path'type'string'length100nullabletrue)]
  205.     private $signaturePath;
  206.     /**
  207.      * @var string
  208.      *
  209.      */
  210.     private $signatureWebPath;
  211.     /**
  212.      * @var float
  213.      */
  214.     #[Column(name'balance_amount'type'float'precision10scale0nullabletrue)]
  215.     private $balanceAmount;
  216.     /**
  217.      * @var float
  218.      */
  219.     #[Column(name'pledge_amount'type'float'precision10scale0nullabletrue)]
  220.     private $pledgeAmount;
  221.     /**
  222.      * @var float
  223.      */
  224.     #[Column(name'reserved_for_ownership_transfer'type'float'precision10scale0nullabletrue)]
  225.     private $reservedForOwnershipTransfer;
  226.     /**
  227.      * @var float
  228.      */
  229.     #[Column(name'balance_due'type'float'precision10scale0nullabletrue)]
  230.     private $balanceDue;
  231.     /**
  232.      * @var \vehicleClient
  233.      */
  234.     #[OneToOne(targetEntity\VehicleClients::class, mappedBy'user')]
  235.     private $vehicleClient;
  236.     /**
  237.      * @var string
  238.      */
  239.     #[Column(name'client_id'type'string'length50nullabletrue)]
  240.     private $clientId;
  241.     /**
  242.      * Get id
  243.      *
  244.      * @return string
  245.      */
  246.     public function getId()
  247.     {
  248.         return $this->getUserId();
  249.     }
  250.     /**
  251.      * Set userId
  252.      *
  253.      * @param string $userId
  254.      *
  255.      * @return Users
  256.      */
  257.     public function setUserId($userId)
  258.     {
  259.         $this->userId $userId;
  260.         return $this;
  261.     }
  262.     /**
  263.      * Get userId
  264.      *
  265.      * @return string
  266.      */
  267.     public function getUserId()
  268.     {
  269.         return $this->userId;
  270.     }
  271.     /**
  272.      * Set username
  273.      *
  274.      * @param string $username
  275.      *
  276.      * @return Users
  277.      */
  278.     public function setUsername($username)
  279.     {
  280.         $this->username $username;
  281.         return $this;
  282.     }
  283.     /**
  284.      * Set password
  285.      *
  286.      * @param string $password
  287.      *
  288.      * @return Users
  289.      */
  290.     public function setPassword($password)
  291.     {
  292.         $this->password $password;
  293.         return $this;
  294.     }
  295.     /**
  296.      * Set telephone
  297.      *
  298.      * @param string $telephone
  299.      *
  300.      * @return Users
  301.      */
  302.     public function setTelephone($telephone)
  303.     {
  304.         $this->telephone $telephone;
  305.         return $this;
  306.     }
  307.     /**
  308.      * Get telephone
  309.      *
  310.      * @return string
  311.      */
  312.     public function getTelephone()
  313.     {
  314.         return $this->telephone;
  315.     }
  316.     /**
  317.      * Set mobileNumber
  318.      *
  319.      * @param string $mobileNumber
  320.      *
  321.      * @return Users
  322.      */
  323.     public function setMobileNumber($mobileNumber)
  324.     {
  325.         $this->mobileNumber $mobileNumber;
  326.         return $this;
  327.     }
  328.     /**
  329.      * Get mobileNumber
  330.      *
  331.      * @return string
  332.      */
  333.     public function getMobileNumber()
  334.     {
  335.         return $this->mobileNumber;
  336.     }
  337.     /**
  338.      * Set mobileNumber2
  339.      *
  340.      * @param string $mobileNumber2
  341.      *
  342.      * @return Users
  343.      */
  344.     public function setMobileNumber2($mobileNumber2)
  345.     {
  346.         $this->mobileNumber2 $mobileNumber2;
  347.         return $this;
  348.     }
  349.     /**
  350.      * Get mobileNumber2
  351.      *
  352.      * @return string
  353.      */
  354.     public function getMobileNumber2()
  355.     {
  356.         return $this->mobileNumber2;
  357.     }
  358.     /**
  359.      * @return bool
  360.      */
  361.     public function getIsMobileNumber2Verified()
  362.     {
  363.         return $this->isMobileNumber2Verified;
  364.     }
  365.     /**
  366.      * @param bool $isMobileNumber2Verified
  367.      */
  368.     public function setIsMobileNumber2Verified($isMobileNumber2Verified)
  369.     {
  370.         $this->isMobileNumber2Verified $isMobileNumber2Verified;
  371.     }
  372.     /**
  373.      * Set email
  374.      *
  375.      * @param string $email
  376.      *
  377.      * @return Users
  378.      */
  379.     public function setEmail($email)
  380.     {
  381.         $this->email $email;
  382.         return $this;
  383.     }
  384.     /**
  385.      * Get email
  386.      *
  387.      * @return string
  388.      */
  389.     public function getEmail()
  390.     {
  391.         return $this->email;
  392.     }
  393.     /**
  394.      * Set emailVerified
  395.      *
  396.      * @param boolean $emailVerified
  397.      *
  398.      * @return Users
  399.      */
  400.     public function setEmailVerified($emailVerified)
  401.     {
  402.         $this->emailVerified $emailVerified;
  403.         return $this;
  404.     }
  405.     /**
  406.      * Get emailVerified
  407.      *
  408.      * @return boolean
  409.      */
  410.     public function getEmailVerified()
  411.     {
  412.         return $this->emailVerified;
  413.     }
  414.     /**
  415.      * Set verify_token
  416.      *
  417.      * @param string $verify_token
  418.      *
  419.      * @return Users
  420.      */
  421.     public function setVerifyToken($verify_token)
  422.     {
  423.         $this->verify_token $verify_token;
  424.         return $this;
  425.     }
  426.     /**
  427.      * Get verify_token
  428.      *
  429.      * @return string
  430.      */
  431.     public function getVerifyToken()
  432.     {
  433.         return $this->verify_token;
  434.     }
  435.     /**
  436.      * Set balance
  437.      *
  438.      * @param float $balance
  439.      *
  440.      * @return Users
  441.      */
  442.     public function setBalance($balance)
  443.     {
  444.         $this->balance $balance;
  445.         return $this;
  446.     }
  447.     /**
  448.      * Get balance
  449.      *
  450.      * @return float
  451.      */
  452.     public function getBalance()
  453.     {
  454.         return $this->balance;
  455.     }
  456.     /**
  457.      * Set lockedOtSecurity
  458.      *
  459.      * @param float $lockedOtSecurity
  460.      *
  461.      * @return Users
  462.      */
  463.     public function setLockedOtSecurity($lockedOtSecurity)
  464.     {
  465.         $this->lockedOtSecurity $lockedOtSecurity;
  466.         return $this;
  467.     }
  468.     /**
  469.      * Get lockedOtSecurity
  470.      *
  471.      * @return float
  472.      */
  473.     public function getLockedOtSecurity()
  474.     {
  475.         return $this->lockedOtSecurity;
  476.     }
  477.     /**
  478.      * Set isVerified
  479.      *
  480.      * @param boolean $isVerified
  481.      *
  482.      * @return Users
  483.      */
  484.     public function setIsVerified($isVerified)
  485.     {
  486.         $this->isVerified $isVerified;
  487.         return $this;
  488.     }
  489.     /**
  490.      * Get isVerified
  491.      *
  492.      * @return boolean
  493.      */
  494.     public function getIsVerified()
  495.     {
  496.         return $this->isVerified;
  497.     }
  498.     /**
  499.      * Set isDeleted
  500.      *
  501.      * @param boolean $isDeleted
  502.      *
  503.      * @return Users
  504.      */
  505.     public function setIsDeleted($isDeleted)
  506.     {
  507.         $this->isDeleted $isDeleted;
  508.         return $this;
  509.     }
  510.     /**
  511.      * Get isDeleted
  512.      *
  513.      * @return boolean
  514.      */
  515.     public function getIsDeleted()
  516.     {
  517.         return $this->isDeleted;
  518.     }
  519.     
  520.     /**
  521.      * Set isReceiveSms
  522.      *
  523.      * @param boolean $isReceiveSms
  524.      *
  525.      * @return Users
  526.      */
  527.     public function setIsReceiveSms($isReceiveSms)
  528.     {
  529.         $this->isReceiveSms $isReceiveSms;
  530.         return $this;
  531.     }
  532.     /**
  533.      * Get isReceiveSms
  534.      *
  535.      * @return boolean
  536.      */
  537.     public function getIsReceiveSms()
  538.     {
  539.         return $this->isReceiveSms;
  540.     }
  541.     /**
  542.      * Set lastLogin
  543.      *
  544.      * @param \DateTime $lastLogin
  545.      *
  546.      * @return Users
  547.      */
  548.     public function setLastLogin($lastLogin)
  549.     {
  550.         $this->lastLogin $lastLogin;
  551.         return $this;
  552.     }
  553.     /**
  554.      * Get lastLogin
  555.      *
  556.      * @return \DateTime
  557.      */
  558.     public function getLastLogin()
  559.     {
  560.         return $this->lastLogin;
  561.     }
  562.     /**
  563.      * Set createdAt
  564.      *
  565.      * @param \DateTime $createdAt
  566.      *
  567.      * @return Users
  568.      */
  569.     public function setCreatedAt($createdAt)
  570.     {
  571.         $this->createdAt $createdAt;
  572.         return $this;
  573.     }
  574.     /**
  575.      * Get createdAt
  576.      *
  577.      * @return \DateTime
  578.      */
  579.     public function getCreatedAt()
  580.     {
  581.         return $this->createdAt;
  582.     }
  583.     /**
  584.      * Set updatedAt
  585.      *
  586.      * @param \DateTime $updatedAt
  587.      *
  588.      * @return Users
  589.      */
  590.     public function setUpdatedAt($updatedAt)
  591.     {
  592.         $this->updatedAt $updatedAt;
  593.         return $this;
  594.     }
  595.     /**
  596.      * Get updatedAt
  597.      *
  598.      * @return \DateTime
  599.      */
  600.     public function getUpdatedAt()
  601.     {
  602.         return $this->updatedAt;
  603.     }
  604.     /**
  605.      * Set category
  606.      *
  607.      *
  608.      * @return Users
  609.      */
  610.     public function setCategory(UsersCategories $category null)
  611.     {
  612.         $this->category $category;
  613.         return $this;
  614.     }
  615.     /**
  616.      * Get category
  617.      *
  618.      * @return UsersCategories
  619.      */
  620.     public function getCategory()
  621.     {
  622.         return $this->category;
  623.     }
  624.     /**
  625.      * Set company
  626.      *
  627.      *
  628.      * @return Users
  629.      */
  630.     public function setCompany(Companies $company null)
  631.     {
  632.         $this->company $company;
  633.         return $this;
  634.     }
  635.     /**
  636.      * Get company
  637.      *
  638.      * @return Companies
  639.      */
  640.     public function getCompany()
  641.     {
  642.         return $this->company;
  643.     }
  644.     /**
  645.      * Set createdBy
  646.      *
  647.      *
  648.      * @return Users
  649.      */
  650.     public function setCreatedBy(Users $createdBy null)
  651.     {
  652.         $this->createdBy $createdBy;
  653.         return $this;
  654.     }
  655.     /**
  656.      * Get createdBy
  657.      *
  658.      * @return Users
  659.      */
  660.     public function getCreatedBy()
  661.     {
  662.         return $this->createdBy;
  663.     }
  664.     /**
  665.      * @return string
  666.      */
  667.     public function getProfileOrigin()
  668.     {
  669.         return $this->profileOrigin;
  670.     }
  671.     /**
  672.      * @param string $profileOrigin
  673.      */
  674.     public function setProfileOrigin($profileOrigin)
  675.     {
  676.         $this->profileOrigin $profileOrigin;
  677.     }
  678.     /**
  679.      * Set updatedBy
  680.      *
  681.      *
  682.      * @return Users
  683.      */
  684.     public function setUpdatedBy(Users $updatedBy null)
  685.     {
  686.         $this->updatedBy $updatedBy;
  687.         return $this;
  688.     }
  689.     /**
  690.      * Get updatedBy
  691.      *
  692.      * @return Users
  693.      */
  694.     public function getUpdatedBy()
  695.     {
  696.         return $this->updatedBy;
  697.     }
  698.     /**
  699.      * Set userIdentityInfo
  700.      *
  701.      *
  702.      * @return Users
  703.      */
  704.     public function setUserIdentityInfo(UserIdentityInfo $userIdentityInfo null)
  705.     {
  706.         $this->userIdentityInfo $userIdentityInfo;
  707.         return $this;
  708.     }
  709.     /**
  710.      * Get userIdentityInfo
  711.      *
  712.      * @return UserIdentityInfo
  713.      */
  714.     public function getUserIdentityInfo()
  715.     {
  716.         return $this->userIdentityInfo;
  717.     }
  718.     /**
  719.      * Set userAdditionalDetails
  720.      *
  721.      *
  722.      * @return Users
  723.      */
  724.     public function setUserAdditionalDetails(UserAdditionalDetails $userAdditionalDetails null)
  725.     {
  726.         $this->userAdditionalDetails $userAdditionalDetails;
  727.         return $this;
  728.     }
  729.     /**
  730.      * Get userAdditionalDetails
  731.      *
  732.      * @return UserAdditionalDetails
  733.      */
  734.     public function getUserAdditionalDetails()
  735.     {
  736.         return $this->userAdditionalDetails;
  737.     }
  738.     #[PrePersist]
  739.     public function prePersist() {
  740.         if ($this->getCreatedAt() == null) {
  741.             $this->setCreatedAt(new \DateTime(date('Y-m-d H:i:s')));
  742.         }
  743.     }
  744.     #[PreUpdate]
  745.     public function preUpdate(PreUpdateEventArgs $event) {
  746.         if (!$event->hasChangedField('last_login')) {
  747.             $this->setUpdatedAt(new \DateTime(date('Y-m-d H:i:s')));
  748.         }
  749.     }
  750.     /**
  751.      * @return string
  752.      */
  753.     public function getUsername()
  754.     {
  755.         return $this->username;
  756.     }
  757.     /**
  758.      * @return null|string
  759.      */
  760.     public function getSalt()
  761.     {
  762.         // you *may* need a real salt depending on your encoder
  763.         // see section on salt below
  764.         return null;
  765.     }
  766.     /**
  767.      * @return string
  768.      */
  769.     public function getPassword(): ?string
  770.     {
  771.         return $this->password;
  772.     }
  773.     public function getRoles(): array
  774.     {
  775.         return $this->roles;
  776.     }
  777.     /**
  778.      *
  779.      */
  780.     public function eraseCredentials()
  781.     {}
  782.     
  783.     /**
  784.      * Returns the identifier for this user (e.g. username or email address).
  785.      */
  786.     public function getUserIdentifier(): string
  787.     {
  788.         return $this->getUsername();
  789.     }
  790.     /**
  791.      * @see \Serializable::serialize()
  792.      *
  793.      * @return string
  794.      */
  795.     public function serialize()
  796.     {
  797.         return serialize(array(
  798.             $this->userId,
  799.             $this->username,
  800.             $this->password,
  801.             // see section on salt below
  802.             // $this->salt,
  803.         ));
  804.     }
  805.     /**
  806.      * @see \Serializable::unserialize()
  807.      *
  808.      * @param string $serialized
  809.      */
  810.     public function unserialize($serialized)
  811.     {
  812.         list (
  813.             $this->userId,
  814.             $this->username,
  815.             $this->password,
  816.             // see section on salt below
  817.             // $this->salt
  818.             ) = unserialize($serialized);
  819.     }
  820.     /**
  821.      * Set roles
  822.      *
  823.      * @param array $roles
  824.      *
  825.      * @return Users
  826.      */
  827.     public function setRoles($roles)
  828.     {
  829.         $this->roles $roles;
  830.         return $this;
  831.     }
  832.     /**
  833.      * Get the entity class name
  834.      *
  835.      * @return string
  836.      * @throws \ReflectionException
  837.      */
  838.     public function getEntityName() {
  839.         return (new \ReflectionClass($this))->getShortName();
  840.     }
  841.     /**
  842.      * @return mixed
  843.      */
  844.     public function getUserBankDetails(){
  845.         return $this->bankAccounts;
  846.     }
  847.     /**
  848.      * @return string
  849.      */
  850.     public function getSignaturePath()
  851.     {
  852.         return $this->signaturePath;
  853.     }
  854.     /**
  855.      * @param string $signaturePath
  856.      */
  857.     public function setSignaturePath($signaturePath)
  858.     {
  859.         $this->signaturePath $signaturePath;
  860.     }
  861.     /**
  862.      * @return string
  863.      */
  864.     public function getSignatureWebPath()
  865.     {
  866.         return $this->signatureWebPath;
  867.     }
  868.     /**
  869.      * @param string $signatureWebPath
  870.      */
  871.     public function setSignatureWebPath($signatureWebPath)
  872.     {
  873.         $this->signatureWebPath $signatureWebPath;
  874.     }
  875.     /**
  876.      * This is to enable fetching user name via VehicleClient->getActualClient() without knowing if it was company or user
  877.      *
  878.      * @param string $locale
  879.      *
  880.      * @return string
  881.      */
  882.     public function getName($locale'ar')
  883.     {
  884.         if($locale == 'en'){
  885.             return $this->getUserIdentityInfo()->getFullNameEn(1);
  886.         }else{
  887.             return $this->getUserIdentityInfo()->getFullNameAr(1);
  888.         }
  889.     }
  890.     /**
  891.      * Set balanceAmount
  892.      *
  893.      * @param float $balanceAmount
  894.      *
  895.      * @return Users
  896.      */
  897.     public function setBalanceAmount($balanceAmount)
  898.     {
  899.         $this->balanceAmount $balanceAmount;
  900.         return $this;
  901.     }
  902.     /**
  903.      * Get balanceAmount
  904.      *
  905.      * @return float
  906.      */
  907.     public function getBalanceAmount()
  908.     {
  909.         return $this->balanceAmount;
  910.     }
  911.     /**
  912.      * Set pledgeAmount
  913.      *
  914.      * @param float $pledgeAmount
  915.      *
  916.      * @return Users
  917.      */
  918.     public function setPledgeAmount($pledgeAmount)
  919.     {
  920.         $this->pledgeAmount $pledgeAmount;
  921.         return $this;
  922.     }
  923.     /**
  924.      * Get pledgeAmount
  925.      *
  926.      * @return float
  927.      */
  928.     public function getPledgeAmount()
  929.     {
  930.         return $this->pledgeAmount;
  931.     }
  932.     /**
  933.      * Set reservedForOwnershipTransfer
  934.      *
  935.      * @param float $reservedForOwnershipTransfer
  936.      *
  937.      * @return Users
  938.      */
  939.     public function setReservedForOwnershipTransfer($reservedForOwnershipTransfer)
  940.     {
  941.         $this->reservedForOwnershipTransfer $reservedForOwnershipTransfer;
  942.         return $this;
  943.     }
  944.     /**
  945.      * Get reservedForOwnershipTransfer
  946.      *
  947.      * @return float
  948.      */
  949.     public function getReservedForOwnershipTransfer()
  950.     {
  951.         return $this->reservedForOwnershipTransfer;
  952.     }
  953.     /**
  954.      * Set balanceDue
  955.      *
  956.      * @param float $balanceDue
  957.      *
  958.      * @return Users
  959.      */
  960.     public function setBalanceDue($balanceDue)
  961.     {
  962.         $this->balanceDue $balanceDue;
  963.         return $this;
  964.     }
  965.     /**
  966.      * Get balanceDue
  967.      *
  968.      * @return float
  969.      */
  970.     public function getBalanceDue()
  971.     {
  972.         return $this->balanceDue;
  973.     }
  974.     /**
  975.      * Set clientId
  976.      *
  977.      * @param string $clientId
  978.      *
  979.      * @return Users
  980.      */
  981.     public function setClientId($clientId)
  982.     {
  983.         $this->clientId $clientId;
  984.         return $this;
  985.     }
  986.     /**
  987.      * Get clientId
  988.      *
  989.      * @return string
  990.      */
  991.     public function getClientId()
  992.     {
  993.         return $this->clientId;
  994.     }
  995. }