2020-04-29 17:37:45 +08:00
|
|
|
<?php
|
2020-07-18 17:12:07 +08:00
|
|
|
|
2020-04-29 17:37:45 +08:00
|
|
|
namespace catchAdmin\system\model;
|
|
|
|
|
|
|
|
use catcher\traits\db\BaseOptionsTrait;
|
2020-07-18 17:12:07 +08:00
|
|
|
use catchAdmin\system\model\search\LoginLogSearch;
|
2020-04-29 17:37:45 +08:00
|
|
|
|
|
|
|
class LoginLog extends \think\Model
|
|
|
|
{
|
2020-07-18 17:12:07 +08:00
|
|
|
use BaseOptionsTrait, LoginLogSearch;
|
|
|
|
|
|
|
|
protected $name = 'login_log';
|
2020-04-29 17:37:45 +08:00
|
|
|
|
2020-07-18 17:12:07 +08:00
|
|
|
protected $field = [
|
|
|
|
'id', //
|
2020-04-29 17:37:45 +08:00
|
|
|
'login_name', // 用户名
|
|
|
|
'login_ip', // 登录地点ip
|
|
|
|
'browser', // 浏览器
|
|
|
|
'os', // 操作系统
|
|
|
|
'login_at', // 登录时间
|
|
|
|
'status', // 1 成功 2 失败
|
2020-07-18 17:12:07 +08:00
|
|
|
];
|
|
|
|
|
|
|
|
public function getList()
|
|
|
|
{
|
|
|
|
return $this->catchSearch()
|
|
|
|
->order('id', 'desc')
|
|
|
|
->paginate();
|
|
|
|
}
|
|
|
|
}
|