feat(admin): XHProf 性能日志五张表 Scheme 迁移与模型

This commit is contained in:
augushong
2026-08-14 22:04:52 +08:00
parent da388a8c4f
commit 7e73902325
15 changed files with 478 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
<?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\Component;
use app\common\scheme\attribute\Index;
#[Table(name: 'ul_xhprof_watch', comment: 'XHProf 函数监控规则')]
#[Index(columns: ['regex'], name: 'uniq_regex', type: 'UNIQUE')]
class XhprofWatch extends BaseScheme
{
#[Field(type: 'int', length: 11, nullable: false, unsigned: true, autoIncrement: true, primary: true)]
public $id;
#[Field(type: 'varchar', length: 100, nullable: false, comment: '规则名称(人读)')]
#[Component(type: 'text', options: [])]
public $name;
#[Field(type: 'varchar', length: 255, nullable: false, comment: 'PCRE 正则(对被调用函数名匹配)')]
#[Component(type: 'text', options: [])]
public $regex;
#[Field(type: 'varchar', length: 255, nullable: false, default: '', comment: '备注')]
#[Component(type: 'text', options: [])]
public $note;
#[Field(type: 'int', length: 11, default: '0', comment: '比对阈值毫秒0=不比对')]
#[Component(type: 'text', options: [])]
public $threshold_ms;
#[Field(type: 'tinyint', length: 4, default: '1', comment: '状态:1=启用,0=禁用')]
#[Component(type: 'switch', options: ['0' => '禁用', '1' => '启用'])]
public $status;
#[Field(type: 'int', length: 11, unsigned: true, comment: '创建时间戳')]
#[Component(type: 'date', options: [])]
public $create_time;
#[Field(type: 'int', length: 11, unsigned: true, comment: '更新时间戳')]
#[Component(type: 'date', options: [])]
public $update_time;
}