2020-11-04 16:47:17 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare (strict_types=1);
|
2020-11-14 18:10:28 +08:00
|
|
|
|
2020-11-04 16:47:17 +08:00
|
|
|
namespace App\Model;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class User
|
|
|
|
*
|
|
|
|
* @property integer $id 用户ID
|
|
|
|
* @property string $nickname 用户昵称
|
|
|
|
* @property string $mobile 登录手机号
|
|
|
|
* @property string $password 登录密码
|
|
|
|
* @property string $avatar 头像
|
|
|
|
* @property integer $gender 性别
|
|
|
|
* @property integer $created_at 注册时间
|
|
|
|
*
|
|
|
|
* @package App\Model
|
|
|
|
*/
|
2020-11-05 17:40:51 +08:00
|
|
|
class User extends BaseModel
|
2020-11-04 16:47:17 +08:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The table associated with the model.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $table = 'users';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The attributes that are mass assignable.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
2020-11-04 22:58:49 +08:00
|
|
|
protected $fillable = [
|
2020-11-14 18:10:28 +08:00
|
|
|
'mobile', 'nickname', 'avatar', 'gender', 'password', 'motto', 'email', 'created_at'
|
2020-11-04 22:58:49 +08:00
|
|
|
];
|
2020-11-04 16:47:17 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The attributes that should be cast to native types.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $casts = [];
|
|
|
|
}
|