初始化仓库
This commit is contained in:
85
common/modelsgii/User.php
Normal file
85
common/modelsgii/User.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<?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',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user