mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
69 lines
2.4 KiB
PHP
69 lines
2.4 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\Component;
|
|
use app\common\scheme\attribute\Index;
|
|
|
|
#[Table(name: 'ul_system_host', comment: '系统节点表')]
|
|
#[Index(columns: ['node_id'], name: 'node_id', type: 'UNIQUE')]
|
|
class SystemHost extends BaseScheme
|
|
{
|
|
#[Field(type: 'int', length: 11, nullable: false, unsigned: true, autoIncrement: true, primary: true)]
|
|
public $id;
|
|
|
|
#[Field(length: 100, precision: 100, nullable: false, comment: '节点ID')]
|
|
#[Component(type: 'text', options: [])]
|
|
public $node_id;
|
|
|
|
#[Field(length: 45, precision: 45, comment: 'IP地址')]
|
|
#[Component(type: 'text', options: [])]
|
|
public $ip_address;
|
|
|
|
#[Field(type: 'int', length: 11, nullable: false, default: '1', comment: '状态')]
|
|
#[Component(type: 'switch', options: ['离线', '在线'])]
|
|
public $status;
|
|
|
|
#[Field(type: 'tinyint', length: 4, default: '0', comment: '是否主节点:0=否,1=是')]
|
|
#[Component(type: 'switch', options: ['否', '是'])]
|
|
public $is_master;
|
|
|
|
#[Field(type: 'datetime', comment: '最后心跳时间')]
|
|
#[Component(type: 'date', options: [])]
|
|
public $last_heartbeat_at;
|
|
|
|
#[Field(length: 255, precision: 255, comment: '系统信息')]
|
|
#[Component(type: 'text', options: [])]
|
|
public $os_info;
|
|
|
|
#[Field(length: 50, precision: 50, comment: 'PHP版本')]
|
|
#[Component(type: 'text', options: [])]
|
|
public $php_version;
|
|
|
|
#[Field(length: 50, precision: 50, comment: 'CPU负载')]
|
|
#[Component(type: 'text', options: [])]
|
|
public $cpu_load;
|
|
|
|
#[Field(type: 'bigint', length: 11, comment: '内存占用(byte)')]
|
|
#[Component(type: 'text', options: [])]
|
|
public $memory_usage;
|
|
|
|
#[Field(type: 'bigint', length: 11, comment: '磁盘可用空间(byte)')]
|
|
#[Component(type: 'text', options: [])]
|
|
public $disk_free;
|
|
|
|
#[Field(type: 'bigint', length: 11, comment: '磁盘总空间(byte)')]
|
|
#[Component(type: 'text', options: [])]
|
|
public $disk_total;
|
|
|
|
#[Field(type: 'int', length: 11, comment: '首次运行时间', unsigned: true)]
|
|
#[Component(type: 'date', options: [])]
|
|
public $create_time;
|
|
|
|
#[Field(type: 'int', length: 11, comment: '更新时间', unsigned: true)]
|
|
#[Component(type: 'date', options: [])]
|
|
public $update_time;
|
|
} |