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

33 lines
1.1 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_ua', comment: 'nginx 按 User-Agent 聚合统计')]
#[Index(columns: ['stat_date', 'ua_type', 'ua_name'], name: 'uniq_date_type_name', type: 'UNIQUE')]
#[Index(columns: ['stat_date'], name: 'idx_stat_date', type: 'NORMAL')]
class NginxStatUa 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: 20, default: 'unknown', comment: 'UA 类型(browser/spider/unknown)')]
public $ua_type;
#[Field(type: 'varchar', length: 255, nullable: false, comment: 'UA 名称(具体型号)')]
public $ua_name;
#[Field(type: 'int', length: 11, default: '0', comment: '页面浏览量')]
public $pv;
#[Field(type: 'int', length: 11, default: '0', comment: '独立访客数')]
public $uv;
}