登录日志新增数据搜索功能

This commit is contained in:
tlerbao
2020-07-18 17:12:07 +08:00
parent eee53b3131
commit bb1dd9b207
3 changed files with 39 additions and 8 deletions

View File

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