feat: 添加记录操作日志功能

This commit is contained in:
2025-03-10 16:21:49 +08:00
parent a803fa6959
commit ba1651c352
5 changed files with 95 additions and 3 deletions

View File

@@ -0,0 +1,35 @@
<?php
declare (strict_types = 1);
namespace app\admin\model\v1;
use think\Model;
/**
* @mixin \think\Model
*/
class SysOperateLog extends Model
{
// 表名
protected $name = 'sys_operate_log';
// 主键
protected $pk = 'id';
// 字段信息
protected $schema = [
'id' => 'int',
'user_id' => 'int',
'title' => 'string',
'version' => 'string',
'method' => 'string',
'controller' => 'string',
'action' => 'string',
'url' => 'string',
'ip' => 'string',
'params' => 'string',
'status' => 'int',
'message' => 'string',
'created_at' => 'datetime'
];
}