<?php
namespace CoreBundle\Entity;
use MyBundle\Entity\UserInfo;
use MyBundle\Entity\UserWallet;
use DateTime;
use Doctrine\Common\Collections\Collection;
/**
* User
*/
class User extends \FOS\UserBundle\Model\User
{
const MIN_LENGTH_PHONE = 10;
const UTM_REGISTRATION = 1;
const UTM_LOGIN = 2;
/**
* @var Dealer
*/
private $dealer;
/**
* @var \ImporterBundle\Entity\Dealer
*/
private $sub_dealer;
/**
* @var string
*/
private $phone;
/**
* @var string
*/
private $phone_new;
/**
* @var integer
*/
private $confirmed_phone;
/**
* @var string
*/
private $name;
/**
* @var UserInfo
*/
private $info;
/**
* @var string
*/
private $hash;
/**
* @var string
*/
private $email_hash;
/**
* @var string
*/
private $last_name;
/**
* @var string
*/
private $middle_name;
/**
* @var DateTime
*/
private $birth_date;
/**
* @var integer
*/
private $gender;
/**
* @var integer
*/
private $is_loyalty;
/**
* @var string
*/
private $onec_uid;
/**
* @var array|null
*/
private $change_dealer_list = [];
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set dealer
*
* @param Dealer $dealer
*
* @return User
*/
public function setDealer(Dealer $dealer = null)
{
$this->dealer = $dealer;
return $this;
}
/**
* Get dealer
*
* @return Dealer
*/
public function getDealer()
{
return $this->dealer;
}
/**
* Set phone
*
* @param string $phone
*
* @return User
*/
public function setPhone($phone)
{
$this->phone = $phone;
return $this;
}
/**
* Get phone
*
* @return string
*/
public function getPhone()
{
return $this->phone;
}
/**
* Set confirmedPhone
*
* @param integer $confirmedPhone
*
* @return User
*/
public function setConfirmedPhone($confirmedPhone)
{
$this->confirmed_phone = $confirmedPhone;
return $this;
}
/**
* Get confirmedPhone
*
* @return integer
*/
public function getConfirmedPhone()
{
return $this->confirmed_phone;
}
/**
* Set name
*
* @param string $name
*
* @return User
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Set hash
*
* @param string $hash
*
* @return User
*/
public function setHash($hash)
{
$this->hash = $hash;
return $this;
}
/**
* Get hash
*
* @return string
*/
public function getHash()
{
return $this->hash;
}
/**
* Set emailHash
*
* @param string $emailHash
*
* @return User
*/
public function setEmailHash($emailHash)
{
$this->email_hash = $emailHash;
return $this;
}
/**
* Get emailHash
*
* @return string
*/
public function getEmailHash()
{
return $this->email_hash;
}
/**
* Set lastName
*
* @param string $lastName
*
* @return User
*/
public function setLastName($lastName)
{
$this->last_name = $lastName;
return $this;
}
/**
* Get lastName
*
* @return string
*/
public function getLastName()
{
return $this->last_name;
}
/**
* Set middleName
*
* @param string $middleName
*
* @return User
*/
public function setMiddleName($middleName)
{
$this->middle_name = $middleName;
return $this;
}
/**
* Get middleName
*
* @return string
*/
public function getMiddleName()
{
return $this->middle_name;
}
/**
* Set birthDate
*
* @param DateTime $birthDate
*
* @return User
*/
public function setBirthDate($birthDate)
{
$this->birth_date = $birthDate;
return $this;
}
/**
* Get birthDate
*
* @return DateTime
*/
public function getBirthDate()
{
return $this->birth_date;
}
/**
* Set gender
*
* @param integer $gender
*
* @return User
*/
public function setGender($gender)
{
$this->gender = $gender;
return $this;
}
/**
* Get gender
*
* @return integer
*/
public function getGender()
{
return $this->gender;
}
/**
* @return string
*/
public function getFullName() {
return $this->last_name.' '.$this->name;
}
public function getPib()
{
return $this->last_name.' '.$this->name.' '.$this->middle_name;
}
public function setFullName($fullName)
{
return $this;
}
/**
* Set isLoyalty
*
* @param integer $isLoyalty
*
* @return User
*/
public function setIsLoyalty($isLoyalty)
{
$this->is_loyalty = $isLoyalty;
return $this;
}
/**
* Get isLoyalty
*
* @return integer
*/
public function getIsLoyalty()
{
return $this->is_loyalty;
}
/**
* Set info
*
* @param UserInfo $info
*
* @return User
*/
public function setInfo(UserInfo $info = null)
{
$this->info = $info;
return $this;
}
/**
* Get info
*
* @return UserInfo
*/
public function getInfo()
{
return $this->info;
}
/**
* @var Collection
*/
private $cars;
/**
* Add car
*
* @param UserCar $car
*
* @return User
*/
public function addCar(UserCar $car)
{
$this->cars[] = $car;
return $this;
}
/**
* Remove car
*
* @param UserCar $car
*/
public function removeCar(UserCar $car)
{
$this->cars->removeElement($car);
}
/**
* Get cars
*
* @return Collection
*/
public function getCars()
{
return $this->cars;
}
/**
* @var string
*/
private $insurance_1c_uid;
/**
* Set insurance1cUid
*
* @param string $insurance1cUid
*
* @return User
*/
public function setInsurance1cUid($insurance1cUid)
{
$this->insurance_1c_uid = $insurance1cUid;
return $this;
}
/**
* Get insurance1cUid
*
* @return string
*/
public function getInsurance1cUid()
{
return $this->insurance_1c_uid;
}
/**
* @return string
*/
public function __toString()
{
return (string) $this->getFullName();
}
/**
* Set onecUid
*
* @param string $onecUid
*
* @return User
*/
public function setOnecUid($onecUid)
{
$this->onec_uid = $onecUid;
return $this;
}
/**
* Get onecUid
*
* @return string
*/
public function getOnecUid()
{
return $this->onec_uid;
}
/**
* @var Collection
*/
private $wallets;
/**
* Add wallet
*
* @param UserWallet $wallet
*
* @return User
*/
public function addWallet(UserWallet $wallet)
{
$this->wallets[] = $wallet;
return $this;
}
/**
* Remove wallet
*
* @param UserWallet $wallet
*/
public function removeWallet(UserWallet $wallet)
{
$this->wallets->removeElement($wallet);
}
/**
* Get wallets
*
* @return Collection
*/
public function getWallets()
{
return $this->wallets;
}
/**
* @var string
*/
private $fb_id;
/**
* Set fbId
*
* @param string $fbId
*
* @return User
*/
public function setFbId($fbId)
{
$this->fb_id = $fbId;
return $this;
}
/**
* Get fbId
*
* @return string
*/
public function getFbId()
{
return $this->fb_id;
}
/**
* @var string
*/
private $google_id;
/**
* Set googleId
*
* @param string $googleId
*
* @return User
*/
public function setGoogleId($googleId)
{
$this->google_id = $googleId;
return $this;
}
/**
* Get googleId
*
* @return string
*/
public function getGoogleId()
{
return $this->google_id;
}
/**
* @var integer
*/
private $confirm_phone_cod;
/**
* Set confirmPhoneCod
*
* @param integer $confirmPhoneCod
*
* @return User
*/
public function setConfirmPhoneCod($confirmPhoneCod)
{
$this->confirm_phone_cod = $confirmPhoneCod;
return $this;
}
/**
* Get confirmPhoneCod
*
* @return integer
*/
public function getConfirmPhoneCod()
{
return $this->confirm_phone_cod;
}
/**
* @var integer
*/
private $redmine_id;
/**
* Set redmineId
*
* @param integer $redmineId
*
* @return User
*/
public function setRedmineId($redmineId)
{
$this->redmine_id = $redmineId;
return $this;
}
/**
* Get redmineId
*
* @return integer
*/
public function getRedmineId()
{
return $this->redmine_id;
}
/**
* @var string
*/
private $crm_id;
/**
* Set crmId
*
* @param string $crmId
*
* @return User
*/
public function setCrmId($crmId)
{
$this->crm_id = $crmId;
return $this;
}
/**
* Get crmId
*
* @return string
*/
public function getCrmId()
{
return $this->crm_id;
}
/**
* @return \ImporterBundle\Entity\Dealer
*/
public function getSubDealer()
{
return $this->sub_dealer;
}
/**
* @param \ImporterBundle\Entity\Dealer $sub_dealer
*
* @return User
*/
public function setSubDealer(\ImporterBundle\Entity\Dealer $sub_dealer = null)
{
$this->sub_dealer = $sub_dealer;
return $this;
}
/**
* @var string
*/
private $inn;
/**
* Set inn
*
* @param string $inn
*
* @return User
*/
public function setInn($inn)
{
$this->inn = $inn;
return $this;
}
/**
* Get inn
*
* @return string
*/
public function getInn()
{
return $this->inn;
}
/**
* @var integer
*/
private $otp;
/**
* @var DateTime
*/
private $otp_exp_date;
/**
* Set otp
*
* @param integer $otp
*
* @return User
*/
public function setOtp($otp)
{
$this->otp = $otp;
return $this;
}
/**
* Get otp
*
* @return integer
*/
public function getOtp()
{
return $this->otp;
}
/**
* Set otpExpDate
*
* @param DateTime $otpExpDate
*
* @return User
*/
public function setOtpExpDate($otpExpDate)
{
$this->otp_exp_date = $otpExpDate;
return $this;
}
/**
* Get otpExpDate
*
* @return DateTime
*/
public function getOtpExpDate()
{
return $this->otp_exp_date;
}
/**
* @var DateTime
*/
private $created_at;
/**
* Set createdAt
*
* @param DateTime $createdAt
*
* @return User
*/
public function setCreatedAt($createdAt)
{
$this->created_at = $createdAt;
return $this;
}
/**
* Get createdAt
*
* @return DateTime
*/
public function getCreatedAt()
{
return $this->created_at;
}
/**
* @var string
*/
private $referrer;
/**
* Set referrer
*
* @param string $referrer
*
* @return User
*/
public function setReferrer($referrer)
{
$this->referrer = $referrer;
return $this;
}
/**
* Get referrer
*
* @return string
*/
public function getReferrer()
{
return $this->referrer;
}
/**
* @var integer
*/
private $registration_confirm;
/**
* Set registrationConfirm
*
* @param integer $registrationConfirm
*
* @return User
*/
public function setRegistrationConfirm($registrationConfirm)
{
$this->registration_confirm = $registrationConfirm;
return $this;
}
/**
* Get registrationConfirm
*
* @return integer
*/
public function getRegistrationConfirm()
{
return $this->registration_confirm;
}
/**
* @var string
*/
private $auth_bank_id;
/**
* Set authBankId
*
* @param string $authBankId
*
* @return User
*/
public function setAuthBankId($authBankId)
{
$this->auth_bank_id = $authBankId;
return $this;
}
/**
* Get authBankId
*
* @return string
*/
public function getAuthBankId()
{
return $this->auth_bank_id;
}
/**
* @var string
*/
private $finance_phone;
/**
* Set financePhone
*
* @param string $financePhone
*
* @return User
*/
public function setFinancePhone($financePhone)
{
$this->finance_phone = $financePhone;
return $this;
}
/**
* Get financePhone
*
* @return string
*/
public function getFinancePhone()
{
return $this->finance_phone;
}
/**
* @return array|null
*/
public function getChangeDealerList(): ?array
{
return $this->change_dealer_list;
}
/**
* @param array|null $changeDealerList
* @return self
*/
public function setChangeDealerList(?array $changeDealerList): self
{
$this->change_dealer_list = $changeDealerList;
return $this;
}
public function getPhoneNew(): string
{
return $this->phone_new;
}
public function setPhoneNew(?string $phone_new = null): void
{
$this->phone_new = $phone_new;
}
}