src/CoreBundle/Entity/User.php line 13

Open in your IDE?
  1. <?php
  2. namespace CoreBundle\Entity;
  3. use MyBundle\Entity\UserInfo;
  4. use MyBundle\Entity\UserWallet;
  5. use DateTime;
  6. use Doctrine\Common\Collections\Collection;
  7. /**
  8.  * User
  9.  */
  10. class User extends \FOS\UserBundle\Model\User
  11. {
  12.     const MIN_LENGTH_PHONE 10;
  13.     const UTM_REGISTRATION 1;
  14.     const UTM_LOGIN 2;
  15.     /**
  16.      * @var Dealer
  17.      */
  18.     private $dealer;
  19.     /**
  20.      * @var \ImporterBundle\Entity\Dealer
  21.      */
  22.     private $sub_dealer;
  23.     /**
  24.      * @var string
  25.      */
  26.     private $phone;
  27.     /**
  28.      * @var string
  29.      */
  30.     private $phone_new;
  31.     /**
  32.      * @var integer
  33.      */
  34.     private $confirmed_phone;
  35.     /**
  36.      * @var string
  37.      */
  38.     private $name;
  39.     /**
  40.      * @var UserInfo
  41.      */
  42.     private $info;
  43.     /**
  44.      * @var string
  45.      */
  46.     private $hash;
  47.     /**
  48.      * @var string
  49.      */
  50.     private $email_hash;
  51.     /**
  52.      * @var string
  53.      */
  54.     private $last_name;
  55.     /**
  56.      * @var string
  57.      */
  58.     private $middle_name;
  59.     /**
  60.      * @var DateTime
  61.      */
  62.     private $birth_date;
  63.     /**
  64.      * @var integer
  65.      */
  66.     private $gender;
  67.     /**
  68.      * @var integer
  69.      */
  70.     private $is_loyalty;
  71.     /**
  72.      * @var string
  73.      */
  74.     private $onec_uid;
  75.     /**
  76.      * @var array|null
  77.      */
  78.     private $change_dealer_list = [];
  79.     /**
  80.      * Get id
  81.      *
  82.      * @return integer
  83.      */
  84.     public function getId()
  85.     {
  86.         return $this->id;
  87.     }
  88.     /**
  89.      * Set dealer
  90.      *
  91.      * @param Dealer $dealer
  92.      *
  93.      * @return User
  94.      */
  95.     public function setDealer(Dealer $dealer null)
  96.     {
  97.         $this->dealer $dealer;
  98.         return $this;
  99.     }
  100.     /**
  101.      * Get dealer
  102.      *
  103.      * @return Dealer
  104.      */
  105.     public function getDealer()
  106.     {
  107.         return $this->dealer;
  108.     }
  109.     /**
  110.      * Set phone
  111.      *
  112.      * @param string $phone
  113.      *
  114.      * @return User
  115.      */
  116.     public function setPhone($phone)
  117.     {
  118.         $this->phone $phone;
  119.         return $this;
  120.     }
  121.     /**
  122.      * Get phone
  123.      *
  124.      * @return string
  125.      */
  126.     public function getPhone()
  127.     {
  128.         return $this->phone;
  129.     }
  130.     /**
  131.      * Set confirmedPhone
  132.      *
  133.      * @param integer $confirmedPhone
  134.      *
  135.      * @return User
  136.      */
  137.     public function setConfirmedPhone($confirmedPhone)
  138.     {
  139.         $this->confirmed_phone $confirmedPhone;
  140.         return $this;
  141.     }
  142.     /**
  143.      * Get confirmedPhone
  144.      *
  145.      * @return integer
  146.      */
  147.     public function getConfirmedPhone()
  148.     {
  149.         return $this->confirmed_phone;
  150.     }
  151.     /**
  152.      * Set name
  153.      *
  154.      * @param string $name
  155.      *
  156.      * @return User
  157.      */
  158.     public function setName($name)
  159.     {
  160.         $this->name $name;
  161.         return $this;
  162.     }
  163.     /**
  164.      * Get name
  165.      *
  166.      * @return string
  167.      */
  168.     public function getName()
  169.     {
  170.         return $this->name;
  171.     }
  172.     /**
  173.      * Set hash
  174.      *
  175.      * @param string $hash
  176.      *
  177.      * @return User
  178.      */
  179.     public function setHash($hash)
  180.     {
  181.         $this->hash $hash;
  182.         return $this;
  183.     }
  184.     /**
  185.      * Get hash
  186.      *
  187.      * @return string
  188.      */
  189.     public function getHash()
  190.     {
  191.         return $this->hash;
  192.     }
  193.     /**
  194.      * Set emailHash
  195.      *
  196.      * @param string $emailHash
  197.      *
  198.      * @return User
  199.      */
  200.     public function setEmailHash($emailHash)
  201.     {
  202.         $this->email_hash $emailHash;
  203.         return $this;
  204.     }
  205.     /**
  206.      * Get emailHash
  207.      *
  208.      * @return string
  209.      */
  210.     public function getEmailHash()
  211.     {
  212.         return $this->email_hash;
  213.     }
  214.     /**
  215.      * Set lastName
  216.      *
  217.      * @param string $lastName
  218.      *
  219.      * @return User
  220.      */
  221.     public function setLastName($lastName)
  222.     {
  223.         $this->last_name $lastName;
  224.         return $this;
  225.     }
  226.     /**
  227.      * Get lastName
  228.      *
  229.      * @return string
  230.      */
  231.     public function getLastName()
  232.     {
  233.         return $this->last_name;
  234.     }
  235.     /**
  236.      * Set middleName
  237.      *
  238.      * @param string $middleName
  239.      *
  240.      * @return User
  241.      */
  242.     public function setMiddleName($middleName)
  243.     {
  244.         $this->middle_name $middleName;
  245.         return $this;
  246.     }
  247.     /**
  248.      * Get middleName
  249.      *
  250.      * @return string
  251.      */
  252.     public function getMiddleName()
  253.     {
  254.         return $this->middle_name;
  255.     }
  256.     /**
  257.      * Set birthDate
  258.      *
  259.      * @param DateTime $birthDate
  260.      *
  261.      * @return User
  262.      */
  263.     public function setBirthDate($birthDate)
  264.     {
  265.         $this->birth_date $birthDate;
  266.         return $this;
  267.     }
  268.     /**
  269.      * Get birthDate
  270.      *
  271.      * @return DateTime
  272.      */
  273.     public function getBirthDate()
  274.     {
  275.         return $this->birth_date;
  276.     }
  277.     /**
  278.      * Set gender
  279.      *
  280.      * @param integer $gender
  281.      *
  282.      * @return User
  283.      */
  284.     public function setGender($gender)
  285.     {
  286.         $this->gender $gender;
  287.         return $this;
  288.     }
  289.     /**
  290.      * Get gender
  291.      *
  292.      * @return integer
  293.      */
  294.     public function getGender()
  295.     {
  296.         return $this->gender;
  297.     }
  298.     /**
  299.      * @return string
  300.      */
  301.     public function getFullName() {
  302.         return $this->last_name.' '.$this->name;
  303.     }
  304.     public function getPib()
  305.     {
  306.         return $this->last_name.' '.$this->name.' '.$this->middle_name;
  307.     }
  308.     public function setFullName($fullName)
  309.     {
  310.         return $this;
  311.     }
  312.     /**
  313.      * Set isLoyalty
  314.      *
  315.      * @param integer $isLoyalty
  316.      *
  317.      * @return User
  318.      */
  319.     public function setIsLoyalty($isLoyalty)
  320.     {
  321.         $this->is_loyalty $isLoyalty;
  322.         return $this;
  323.     }
  324.     /**
  325.      * Get isLoyalty
  326.      *
  327.      * @return integer
  328.      */
  329.     public function getIsLoyalty()
  330.     {
  331.         return $this->is_loyalty;
  332.     }
  333.     /**
  334.      * Set info
  335.      *
  336.      * @param UserInfo $info
  337.      *
  338.      * @return User
  339.      */
  340.     public function setInfo(UserInfo $info null)
  341.     {
  342.         $this->info $info;
  343.         return $this;
  344.     }
  345.     /**
  346.      * Get info
  347.      *
  348.      * @return UserInfo
  349.      */
  350.     public function getInfo()
  351.     {
  352.         return $this->info;
  353.     }
  354.     /**
  355.      * @var Collection
  356.      */
  357.     private $cars;
  358.     /**
  359.      * Add car
  360.      *
  361.      * @param UserCar $car
  362.      *
  363.      * @return User
  364.      */
  365.     public function addCar(UserCar $car)
  366.     {
  367.         $this->cars[] = $car;
  368.         return $this;
  369.     }
  370.     /**
  371.      * Remove car
  372.      *
  373.      * @param UserCar $car
  374.      */
  375.     public function removeCar(UserCar $car)
  376.     {
  377.         $this->cars->removeElement($car);
  378.     }
  379.     /**
  380.      * Get cars
  381.      *
  382.      * @return Collection
  383.      */
  384.     public function getCars()
  385.     {
  386.         return $this->cars;
  387.     }
  388.     /**
  389.      * @var string
  390.      */
  391.     private $insurance_1c_uid;
  392.     /**
  393.      * Set insurance1cUid
  394.      *
  395.      * @param string $insurance1cUid
  396.      *
  397.      * @return User
  398.      */
  399.     public function setInsurance1cUid($insurance1cUid)
  400.     {
  401.         $this->insurance_1c_uid $insurance1cUid;
  402.         return $this;
  403.     }
  404.     /**
  405.      * Get insurance1cUid
  406.      *
  407.      * @return string
  408.      */
  409.     public function getInsurance1cUid()
  410.     {
  411.         return $this->insurance_1c_uid;
  412.     }
  413.     /**
  414.      * @return string
  415.      */
  416.     public function __toString()
  417.     {
  418.         return (string) $this->getFullName();
  419.     }
  420.     /**
  421.      * Set onecUid
  422.      *
  423.      * @param string $onecUid
  424.      *
  425.      * @return User
  426.      */
  427.     public function setOnecUid($onecUid)
  428.     {
  429.         $this->onec_uid $onecUid;
  430.         return $this;
  431.     }
  432.     /**
  433.      * Get onecUid
  434.      *
  435.      * @return string
  436.      */
  437.     public function getOnecUid()
  438.     {
  439.         return $this->onec_uid;
  440.     }
  441.     /**
  442.      * @var Collection
  443.      */
  444.     private $wallets;
  445.     /**
  446.      * Add wallet
  447.      *
  448.      * @param UserWallet $wallet
  449.      *
  450.      * @return User
  451.      */
  452.     public function addWallet(UserWallet $wallet)
  453.     {
  454.         $this->wallets[] = $wallet;
  455.         return $this;
  456.     }
  457.     /**
  458.      * Remove wallet
  459.      *
  460.      * @param UserWallet $wallet
  461.      */
  462.     public function removeWallet(UserWallet $wallet)
  463.     {
  464.         $this->wallets->removeElement($wallet);
  465.     }
  466.     /**
  467.      * Get wallets
  468.      *
  469.      * @return Collection
  470.      */
  471.     public function getWallets()
  472.     {
  473.         return $this->wallets;
  474.     }
  475.     /**
  476.      * @var string
  477.      */
  478.     private $fb_id;
  479.     /**
  480.      * Set fbId
  481.      *
  482.      * @param string $fbId
  483.      *
  484.      * @return User
  485.      */
  486.     public function setFbId($fbId)
  487.     {
  488.         $this->fb_id $fbId;
  489.         return $this;
  490.     }
  491.     /**
  492.      * Get fbId
  493.      *
  494.      * @return string
  495.      */
  496.     public function getFbId()
  497.     {
  498.         return $this->fb_id;
  499.     }
  500.     /**
  501.      * @var string
  502.      */
  503.     private $google_id;
  504.     /**
  505.      * Set googleId
  506.      *
  507.      * @param string $googleId
  508.      *
  509.      * @return User
  510.      */
  511.     public function setGoogleId($googleId)
  512.     {
  513.         $this->google_id $googleId;
  514.         return $this;
  515.     }
  516.     /**
  517.      * Get googleId
  518.      *
  519.      * @return string
  520.      */
  521.     public function getGoogleId()
  522.     {
  523.         return $this->google_id;
  524.     }
  525.     /**
  526.      * @var integer
  527.      */
  528.     private $confirm_phone_cod;
  529.     /**
  530.      * Set confirmPhoneCod
  531.      *
  532.      * @param integer $confirmPhoneCod
  533.      *
  534.      * @return User
  535.      */
  536.     public function setConfirmPhoneCod($confirmPhoneCod)
  537.     {
  538.         $this->confirm_phone_cod $confirmPhoneCod;
  539.         return $this;
  540.     }
  541.     /**
  542.      * Get confirmPhoneCod
  543.      *
  544.      * @return integer
  545.      */
  546.     public function getConfirmPhoneCod()
  547.     {
  548.         return $this->confirm_phone_cod;
  549.     }
  550.     /**
  551.      * @var integer
  552.      */
  553.     private $redmine_id;
  554.     /**
  555.      * Set redmineId
  556.      *
  557.      * @param integer $redmineId
  558.      *
  559.      * @return User
  560.      */
  561.     public function setRedmineId($redmineId)
  562.     {
  563.         $this->redmine_id $redmineId;
  564.         return $this;
  565.     }
  566.     /**
  567.      * Get redmineId
  568.      *
  569.      * @return integer
  570.      */
  571.     public function getRedmineId()
  572.     {
  573.         return $this->redmine_id;
  574.     }
  575.     /**
  576.      * @var string
  577.      */
  578.     private $crm_id;
  579.     /**
  580.      * Set crmId
  581.      *
  582.      * @param string $crmId
  583.      *
  584.      * @return User
  585.      */
  586.     public function setCrmId($crmId)
  587.     {
  588.         $this->crm_id $crmId;
  589.         return $this;
  590.     }
  591.     /**
  592.      * Get crmId
  593.      *
  594.      * @return string
  595.      */
  596.     public function getCrmId()
  597.     {
  598.         return $this->crm_id;
  599.     }
  600.     /**
  601.      * @return \ImporterBundle\Entity\Dealer
  602.      */
  603.     public function getSubDealer()
  604.     {
  605.         return $this->sub_dealer;
  606.     }
  607.     /**
  608.      * @param \ImporterBundle\Entity\Dealer $sub_dealer
  609.      *
  610.      * @return User
  611.      */
  612.     public function setSubDealer(\ImporterBundle\Entity\Dealer $sub_dealer null)
  613.     {
  614.         $this->sub_dealer $sub_dealer;
  615.         return $this;
  616.     }
  617.     /**
  618.      * @var string
  619.      */
  620.     private $inn;
  621.     /**
  622.      * Set inn
  623.      *
  624.      * @param string $inn
  625.      *
  626.      * @return User
  627.      */
  628.     public function setInn($inn)
  629.     {
  630.         $this->inn $inn;
  631.         return $this;
  632.     }
  633.     /**
  634.      * Get inn
  635.      *
  636.      * @return string
  637.      */
  638.     public function getInn()
  639.     {
  640.         return $this->inn;
  641.     }
  642.     /**
  643.      * @var integer
  644.      */
  645.     private $otp;
  646.     /**
  647.      * @var DateTime
  648.      */
  649.     private $otp_exp_date;
  650.     /**
  651.      * Set otp
  652.      *
  653.      * @param integer $otp
  654.      *
  655.      * @return User
  656.      */
  657.     public function setOtp($otp)
  658.     {
  659.         $this->otp $otp;
  660.         return $this;
  661.     }
  662.     /**
  663.      * Get otp
  664.      *
  665.      * @return integer
  666.      */
  667.     public function getOtp()
  668.     {
  669.         return $this->otp;
  670.     }
  671.     /**
  672.      * Set otpExpDate
  673.      *
  674.      * @param DateTime $otpExpDate
  675.      *
  676.      * @return User
  677.      */
  678.     public function setOtpExpDate($otpExpDate)
  679.     {
  680.         $this->otp_exp_date $otpExpDate;
  681.         return $this;
  682.     }
  683.     /**
  684.      * Get otpExpDate
  685.      *
  686.      * @return DateTime
  687.      */
  688.     public function getOtpExpDate()
  689.     {
  690.         return $this->otp_exp_date;
  691.     }
  692.     /**
  693.      * @var DateTime
  694.      */
  695.     private $created_at;
  696.     /**
  697.      * Set createdAt
  698.      *
  699.      * @param DateTime $createdAt
  700.      *
  701.      * @return User
  702.      */
  703.     public function setCreatedAt($createdAt)
  704.     {
  705.         $this->created_at $createdAt;
  706.         return $this;
  707.     }
  708.     /**
  709.      * Get createdAt
  710.      *
  711.      * @return DateTime
  712.      */
  713.     public function getCreatedAt()
  714.     {
  715.         return $this->created_at;
  716.     }
  717.     /**
  718.      * @var string
  719.      */
  720.     private $referrer;
  721.     /**
  722.      * Set referrer
  723.      *
  724.      * @param string $referrer
  725.      *
  726.      * @return User
  727.      */
  728.     public function setReferrer($referrer)
  729.     {
  730.         $this->referrer $referrer;
  731.         return $this;
  732.     }
  733.     /**
  734.      * Get referrer
  735.      *
  736.      * @return string
  737.      */
  738.     public function getReferrer()
  739.     {
  740.         return $this->referrer;
  741.     }
  742.     /**
  743.      * @var integer
  744.      */
  745.     private $registration_confirm;
  746.     /**
  747.      * Set registrationConfirm
  748.      *
  749.      * @param integer $registrationConfirm
  750.      *
  751.      * @return User
  752.      */
  753.     public function setRegistrationConfirm($registrationConfirm)
  754.     {
  755.         $this->registration_confirm $registrationConfirm;
  756.         return $this;
  757.     }
  758.     /**
  759.      * Get registrationConfirm
  760.      *
  761.      * @return integer
  762.      */
  763.     public function getRegistrationConfirm()
  764.     {
  765.         return $this->registration_confirm;
  766.     }
  767.     /**
  768.      * @var string
  769.      */
  770.     private $auth_bank_id;
  771.     /**
  772.      * Set authBankId
  773.      *
  774.      * @param string $authBankId
  775.      *
  776.      * @return User
  777.      */
  778.     public function setAuthBankId($authBankId)
  779.     {
  780.         $this->auth_bank_id $authBankId;
  781.         return $this;
  782.     }
  783.     /**
  784.      * Get authBankId
  785.      *
  786.      * @return string
  787.      */
  788.     public function getAuthBankId()
  789.     {
  790.         return $this->auth_bank_id;
  791.     }
  792.     /**
  793.      * @var string
  794.      */
  795.     private $finance_phone;
  796.     /**
  797.      * Set financePhone
  798.      *
  799.      * @param string $financePhone
  800.      *
  801.      * @return User
  802.      */
  803.     public function setFinancePhone($financePhone)
  804.     {
  805.         $this->finance_phone $financePhone;
  806.         return $this;
  807.     }
  808.     /**
  809.      * Get financePhone
  810.      *
  811.      * @return string
  812.      */
  813.     public function getFinancePhone()
  814.     {
  815.         return $this->finance_phone;
  816.     }
  817.     /**
  818.      * @return array|null
  819.      */
  820.     public function getChangeDealerList(): ?array
  821.     {
  822.         return $this->change_dealer_list;
  823.     }
  824.     /**
  825.      * @param array|null $changeDealerList
  826.      * @return self
  827.      */
  828.     public function setChangeDealerList(?array $changeDealerList): self
  829.     {
  830.         $this->change_dealer_list $changeDealerList;
  831.         return $this;
  832.     }
  833.     public function getPhoneNew(): string
  834.     {
  835.         return $this->phone_new;
  836.     }
  837.     public function setPhoneNew(?string $phone_new null): void
  838.     {
  839.         $this->phone_new $phone_new;
  840.     }
  841. }