feat(api): 新增节点墙状态检测闭环
新增父节点墙状态检测任务、结果上报与节点列表状态装饰, 支持子节点继承父节点检测结果并通过 WS/REST 双链路执行 管理端补充墙状态筛选、搜索、单行与批量检测入口, 同时更新知识库归档并新增后续自动上线方案包
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class ServerGfwCheck extends Model
|
||||
{
|
||||
public const STATUS_PENDING = 'pending';
|
||||
public const STATUS_CHECKING = 'checking';
|
||||
public const STATUS_NORMAL = 'normal';
|
||||
public const STATUS_BLOCKED = 'blocked';
|
||||
public const STATUS_PARTIAL = 'partial';
|
||||
public const STATUS_FAILED = 'failed';
|
||||
public const STATUS_SKIPPED = 'skipped';
|
||||
|
||||
public const FINAL_STATUSES = [
|
||||
self::STATUS_NORMAL,
|
||||
self::STATUS_BLOCKED,
|
||||
self::STATUS_PARTIAL,
|
||||
self::STATUS_FAILED,
|
||||
self::STATUS_SKIPPED,
|
||||
];
|
||||
|
||||
protected $table = 'server_gfw_checks';
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
protected $casts = [
|
||||
'summary' => 'array',
|
||||
'operator_summary' => 'array',
|
||||
'raw_result' => 'array',
|
||||
'checked_at' => 'integer',
|
||||
];
|
||||
|
||||
public function server(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Server::class, 'server_id', 'id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user