Files
ulthon_admin/app/admin/model/NginxAccessLog.php
augushong d5329cdd45 feat(nginx-log): curd 生成 raw/position 后台并改只读
- NginxAccessLog + NginxLogPosition Scheme 加 #[Component] 注解
- Scheme Table name 补 ul_ 前缀(curd 严格校验要求)
- curd 生成 nginx 模块完整后台(controller/model/view/js)
- Base/App 双层只读控制器(参照 TimerLogBase 范式)
  - AccessLogBase: add/edit/delete/modify 全部 error
  - LogPositionBase: 同上
- 视图改造:
  - access_log 裁剪到 8 列核心字段(time_local/method/uri/status/remote_addr/request_time/body_bytes_sent/http_user_agent)
  - status/request_time 自定义 badge 渲染
  - toolbar 清空 + operat 仅保留详情(B 类只读页面)
  - log_position 全字段 + 只读化
- HTTP 验证:index 200 OK + add/edit/delete/modify 全部返回错误
2026-07-28 06:21:13 +08:00

41 lines
1.3 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace app\admin\model;
use app\common\model\TimeModel;
/**
* @property int $id 主键ID
* @property string $file_path 来源日志文件路径
* @property string $remote_addr 客户端 IP含 IPv6
* @property string $remote_user HTTP 认证用户名
* @property int $time_local 请求时间戳(业务时区)
* @property string $method HTTP 方法
* @property string $uri 请求 URI超 255 截断)
* @property string $query_string 查询字符串
* @property string $http_version HTTP 协议版本
* @property int $status HTTP 状态码
* @property int $body_bytes_sent 响应体字节数
* @property string $http_referer Referer
* @property string $http_user_agent User-Agent超 500 截断)
* @property float|double $request_time nginx 请求总耗时
* @property float|double $upstream_response_time upstream 响应时间
* @property int $bytes_sent 总发送字节数(含 header
* @property string $country 国家GeoIP 预留)
* @property string $province 省份GeoIP 预留)
* @property string $city 城市GeoIP 预留)
* @property int $create_time 入库时间戳
*/
class NginxAccessLog extends TimeModel
{
protected $name = "nginx_access_log";
protected $deleteTime = false;
}