You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
477 B
28 lines
477 B
<?php
|
|
namespace App\Http\Model;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use App\Common\Token;
|
|
|
|
class User extends BaseModel
|
|
{
|
|
//用户模型
|
|
|
|
protected $table = 'user';
|
|
public $timestamps = false;
|
|
|
|
/**
|
|
* 不能被批量赋值的属性
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $guarded = [];
|
|
|
|
/**
|
|
* 获取关联到用户的角色
|
|
*/
|
|
public function userrole()
|
|
{
|
|
return $this->belongsTo(UserRole::class, 'role_id', 'id');
|
|
}
|
|
}
|