Files
ulthon_admin/app/admin/scheme/NginxStatHour.php

51 lines
1.8 KiB
PHP

<?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_hour', comment: 'nginx 按小时聚合统计')]
#[Index(columns: ['stat_date', 'stat_hour'], name: 'uniq_date_hour', type: 'UNIQUE')]
#[Index(columns: ['stat_date'], name: 'idx_stat_date', type: 'NORMAL')]
class NginxStatHour 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: 'tinyint', length: 2, default: '0', unsigned: true, comment: '小时(0-23)')]
public $stat_hour;
#[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: 'int', length: 11, default: '0', comment: '2xx 响应数')]
public $status_2xx;
#[Field(type: 'int', length: 11, default: '0', comment: '3xx 响应数')]
public $status_3xx;
#[Field(type: 'int', length: 11, default: '0', comment: '4xx 响应数')]
public $status_4xx;
#[Field(type: 'int', length: 11, default: '0', comment: '5xx 响应数')]
public $status_5xx;
#[Field(type: 'int', length: 11, default: '0', comment: '其他状态码响应数')]
public $status_other;
#[Field(type: 'decimal', precision: 10, scale: 3, default: '0.000', comment: '平均请求耗时(秒)')]
public $avg_request_time;
}