mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-08-30 12:45:32 +08:00
feat(nginx-log): 新增 6 张表 phinx migration + Scheme + model
This commit is contained in:
35
app/admin/scheme/NginxStatUrl.php
Normal file
35
app/admin/scheme/NginxStatUrl.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\scheme;
|
||||
|
||||
use app\common\scheme\BaseScheme;
|
||||
use app\common\scheme\attribute\Table;
|
||||
use app\common\scheme\attribute\Field;
|
||||
use app\common\scheme\attribute\Index;
|
||||
|
||||
#[Table(name: 'nginx_stat_url', comment: 'nginx 按 URL 聚合统计')]
|
||||
#[Index(columns: ['stat_date', 'uri'], name: 'uniq_date_uri', type: 'UNIQUE')]
|
||||
#[Index(columns: ['stat_date'], name: 'idx_stat_date', type: 'NORMAL')]
|
||||
class NginxStatUrl extends BaseScheme
|
||||
{
|
||||
#[Field(type: 'int', length: 11, nullable: false, unsigned: true, autoIncrement: true, primary: true)]
|
||||
public $id;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, unsigned: true, comment: '统计日期(YYYYMMDD)')]
|
||||
public $stat_date;
|
||||
|
||||
#[Field(type: 'varchar', length: 255, nullable: false, comment: '请求 URI')]
|
||||
public $uri;
|
||||
|
||||
#[Field(type: 'int', length: 11, default: '0', comment: '页面浏览量')]
|
||||
public $pv;
|
||||
|
||||
#[Field(type: 'int', length: 11, default: '0', comment: '独立访客数')]
|
||||
public $uv;
|
||||
|
||||
#[Field(type: 'bigint', default: '0', comment: '总流量(字节)')]
|
||||
public $total_bytes;
|
||||
|
||||
#[Field(type: 'decimal', precision: 10, scale: 3, default: '0.000', comment: '平均请求耗时(秒)')]
|
||||
public $avg_request_time;
|
||||
}
|
||||
Reference in New Issue
Block a user