Files
xk-api-yii/common/modelsgii/User.php

86 lines
2.5 KiB
PHP
Raw Normal View History

2024-09-19 11:32:39 +08:00
<?php
namespace common\modelsgii;
use Yii;
/**
* This is the model class for table "yii_user".
*
* @property int $id
* @property string $openid
* @property string $session_key
* @property string $unionid
* @property string $mobile 手机号
* @property string $password 密码
* @property string $nickname 昵称
* @property int $gender 性别值为1时是男性值为2时是女性值为0时是未知
* @property string $country 国家
* @property string $province 省份
* @property string $city 城市
* @property string $avatarurl 头像
* @property string $token
* @property string $idcard 身份证号
* @property int $sex 性别0默认1男2女
* @property int $age 年龄
* @property int $status 身份状态 0待激活待完善1待审核2已认证3已拒绝
* @property int $current_store_id 当前门店
* @property int $created_at
* @property int $updated_at
* @property int $is_delete 是否删除0否
*/
class User extends \common\core\BaseActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'yii_user';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['gender', 'status', 'created_at', 'updated_at', 'is_delete','sex','age','current_store_id'], 'integer'],
[['openid', 'unionid', 'token'], 'string', 'max' => 100],
[['session_key', 'password', 'avatarurl'], 'string', 'max' => 255],
[['mobile', 'idcard'], 'string', 'max' => 20],
[['nickname', 'country', 'province', 'city'], 'string', 'max' => 50],
[['openid'], 'unique'],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'openid' => 'Openid',
'session_key' => 'Session Key',
'unionid' => 'Unionid',
'mobile' => 'Mobile',
'password' => 'Password',
'nickname' => 'Nickname',
'gender' => 'Gender',
'country' => 'Country',
'province' => 'Province',
'city' => 'City',
'avatarurl' => 'Avatarurl',
'token' => 'Token',
'idcard' => 'Idcard',
'age' => 'Age',
'status' => 'Status',
'current_store_id' => 'cCurrent Store Id',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
'is_delete' => 'Is Delete',
];
}
}