123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447 |
- <?php
- /**
- * Mem.php UTF-8
- * 玩家信息
- *
- * @date : 2018/1/19 15:39
- *
- * @license 这不是一个自由软件,未经授权不许任何使用和传播。
- * @author : wuyonghong <wyh@huosdk.com>
- * @version : HUOSDK 8.0
- */
- namespace huo\controller\request;
- class Mem {
- private $creator = ''; /* 账号创建方 */
- private $is_reg = 0; /* 是否注册 1 注册 0 登陆 */
- private $mem_id = 0;/* 玩家ID */
- private $mg_mem_id = 0;/* 游戏玩家ID */
- private $username = ''; /* 用户名 */
- private $nickname = ''; /* 昵称 */
- private $mobile_prefix = ''; /* 国别 */
- private $reg_mobile = ''; /* 注册手机号 */
- private $reg_email = ''; /* 注册邮箱 */
- private $password = ''; /* 密码 */
- private $pay_pwd = ''; /* 支付密码 */
- private $email = ''; /* 邮箱 */
- private $mobile = ''; /* 手机号 */
- private $from_device = ''; /* 设备来源 */
- private $device_id = ''; /* 设备ID android 为imei ios 为idfa */
- private $app_id = ''; /* 注册游戏ID */
- private $agent_id = 0; /* 注册渠道ID */
- private $origin_agent_id = 0; /* 原始渠道ID */
- private $agent_game = ''; /* 注册渠道游戏名称 */
- private $status = 2; /* 状态 1 为试玩状态 2为正常状态,3为冻结状态 */
- private $is_switch = 2; /* 切换状态 1 为切换 2为不切换 */
- private $reg_ip = ''; /* 注册IP */
- private $avatar = ''; /* 头像 */
- private $parent_mem_id = 0; /* 父玩家ID */
- private $reg_time = 0; /* 注册时间 */
- private $login_time = 0; /* 登陆时间 */
- public function __construct($data = []) {
- if (!empty($data)) {
- $this->setData($data);
- }
- }
- /**
- * 设置数据
- *
- * @param array $data
- */
- public function setData($data = []) {
- if (empty($data)) {
- return;
- }
- $this->setUsername(get_val($data, 'username'));
- $this->setPassword(get_val($data, 'password'));
- }
- /**
- * @return string
- */
- public function getCreator() {
- return $this->creator;
- }
- /**
- * @param string $creator
- */
- public function setCreator($creator) {
- $this->creator = $creator;
- }
- /**
- * @return int
- */
- public function getIsReg() {
- return $this->is_reg;
- }
- /**
- * @param int $is_reg
- */
- public function setIsReg($is_reg) {
- $this->is_reg = $is_reg;
- }
- /**
- * @return int
- */
- public function getMemId() {
- return $this->mem_id;
- }
- /**
- * @param int $mem_id
- */
- public function setMemId($mem_id) {
- $this->mem_id = $mem_id;
- }
- /**
- * @return int
- */
- public function getMgMemId() {
- return $this->mg_mem_id;
- }
- /**
- * @param int $mg_mem_id
- */
- public function setMgMemId($mg_mem_id) {
- $this->mg_mem_id = $mg_mem_id;
- }
- /**
- * @return string
- */
- public function getUsername() {
- return $this->username;
- }
- /**
- * @param string $username
- */
- public function setUsername($username) {
- $this->username = $username;
- }
- /**
- * @return string
- */
- public function getNickname() {
- return $this->nickname;
- }
- /**
- * @param string $nickname
- */
- public function setNickname($nickname) {
- $this->nickname = $nickname;
- }
- /**
- * @return string
- */
- public function getMobilePrefix() {
- return $this->mobile_prefix;
- }
- /**
- * @param string $mobile_prefix
- */
- public function setMobilePrefix($mobile_prefix) {
- $this->mobile_prefix = $mobile_prefix;
- }
- /**
- * @return string
- */
- public function getRegMobile() {
- return $this->reg_mobile;
- }
- /**
- * @param string $reg_mobile
- */
- public function setRegMobile($reg_mobile) {
- $this->reg_mobile = $reg_mobile;
- }
- /**
- * @return string
- */
- public function getRegEmail() {
- return $this->reg_email;
- }
- /**
- * @param string $reg_email
- */
- public function setRegEmail($reg_email) {
- $this->reg_email = $reg_email;
- }
- /**
- * @return string
- */
- public function getPassword() {
- return $this->password;
- }
- /**
- * @param string $password
- */
- public function setPassword($password) {
- $this->password = $password;
- }
- /**
- * @return string
- */
- public function getPayPwd() {
- return $this->pay_pwd;
- }
- /**
- * @param string $pay_pwd
- */
- public function setPayPwd($pay_pwd) {
- $this->pay_pwd = $pay_pwd;
- }
- /**
- * @return string
- */
- public function getEmail() {
- return $this->email;
- }
- /**
- * @param string $email
- */
- public function setEmail($email) {
- $this->email = $email;
- }
- /**
- * @return string
- */
- public function getMobile() {
- return $this->mobile;
- }
- /**
- * @param string $mobile
- */
- public function setMobile($mobile) {
- $this->mobile = $mobile;
- }
- /**
- * @return string
- */
- public function getFromDevice() {
- return $this->from_device;
- }
- /**
- * @param string $from_device
- */
- public function setFromDevice($from_device) {
- $this->from_device = $from_device;
- }
- /**
- * @return string
- */
- public function getDeviceId() {
- return $this->device_id;
- }
- /**
- * @param string $device_id
- */
- public function setDeviceId($device_id) {
- $this->device_id = $device_id;
- }
- /**
- * @return string
- */
- public function getAppId() {
- return $this->app_id;
- }
- /**
- * @param string $app_id
- */
- public function setAppId($app_id) {
- $this->app_id = $app_id;
- }
- /**
- * @return string
- */
- public function getAgentId() {
- return $this->agent_id;
- }
- /**
- * @param string $agent_id
- */
- public function setAgentId($agent_id) {
- $this->agent_id = $agent_id;
- }
- /**
- * @return string
- */
- public function getAgentGame() {
- return $this->agent_game;
- }
- /**
- * @param string $agent_game
- */
- public function setAgentGame($agent_game) {
- $this->agent_game = $agent_game;
- }
- /**
- * @return string
- */
- public function getStatus() {
- return $this->status;
- }
- /**
- * @param string $status
- */
- public function setStatus($status) {
- $this->status = $status;
- }
- /**
- * @return string
- */
- public function getSwitch() {
- return $this->is_switch;
- }
- /**
- * @param string $is_switch
- */
- public function setSwitch($is_switch) {
- $this->is_switch = $is_switch;
- }
- /**
- * @return string
- */
- public function getRegIp() {
- return $this->reg_ip;
- }
- /**
- * @param string $reg_ip
- */
- public function setRegIp($reg_ip) {
- $this->reg_ip = $reg_ip;
- }
- /**
- * @return string
- */
- public function getAvatar() {
- return $this->avatar;
- }
- /**
- * @param string $avatar
- */
- public function setAvatar($avatar) {
- $this->avatar = $avatar;
- }
- /**
- * @return int
- */
- public function getParentMemId() {
- return $this->parent_mem_id;
- }
- /**
- * @param int $parent_mem_id
- */
- public function setParentMemId($parent_mem_id) {
- $this->parent_mem_id = $parent_mem_id;
- }
- public function toArray() {
- $_data['username'] = $this->getUsername();
- $_data['nickname'] = $this->getNickname();
- $_data['nickname'] = empty($_data['nickname']) ? $this->getUsername() : $this->getNickname();
- $_data['reg_mobile'] = $this->getRegMobile();
- $_data['reg_email'] = $this->getRegEmail();
- $_data['password'] = $this->getPassword();
- $_data['pay_pwd'] = $this->getPassword();
- $_data['email'] = $this->getEmail();
- $_data['mobile'] = $this->getMobile();
- $_data['from_device'] = $this->getFromDevice();
- $_data['device_id'] = $this->getDeviceId();
- $_data['app_id'] = $this->getAppId();
- $_data['agent_id'] = $this->getAgentId();
- $_data['agent_game'] = $this->getAgentGame();
- $_data['status'] = $this->getStatus();
- $_data['is_switch'] = $this->getSwitch();
- $_data['reg_ip'] = $this->getRegIp();
- $_data['avatar'] = $this->getAvatar();
- $_data['parent_mem_id'] = $this->getParentMemId();
- return $_data;
- }
- /**
- * @return int
- */
- public function getRegTime() {
- return $this->reg_time;
- }
- /**
- * @param int $reg_time
- */
- public function setRegTime($reg_time) {
- $this->reg_time = $reg_time;
- }
- /**
- * @return int
- */
- public function getLoginTime() {
- return $this->login_time;
- }
- /**
- * @param int $login_time
- */
- public function setLoginTime($login_time) {
- $this->login_time = $login_time;
- }
- /**
- * @return int
- */
- public function getOriginAgentId() {
- return $this->origin_agent_id;
- }
- /**
- * @param int $origin_agent_id
- */
- public function setOriginAgentId($origin_agent_id) {
- $this->origin_agent_id = $origin_agent_id;
- }
- }
|