mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-09-04 23:13:26 +08:00
feat(admin): XHProf 性能日志五张表 Scheme 迁移与模型
This commit is contained in:
45
app/admin/scheme/XhprofWatch.php
Normal file
45
app/admin/scheme/XhprofWatch.php
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user