feat(mcp): MCP 调用日志只读列表页

This commit is contained in:
augushong
2026-08-16 20:55:03 +08:00
parent 918d1d4dd5
commit 25c98b6ed6
6 changed files with 187 additions and 0 deletions

View File

@@ -4,9 +4,30 @@ namespace base\admin\model;
use app\common\model\TimeModel;
/**
* @property int $id
* @property int $key_id 密钥ID
* @property string $node 节点
* @property string $arguments 参数摘要JSON
* @property int $is_success 是否成功 0:失败,1:成功
* @property int $cost_ms 耗时毫秒
* @property int $create_time 创建时间
* @property \app\admin\model\SystemMcpKey|null $mcpKey 密钥
*/
class SystemMcpLogBase extends TimeModel
{
protected $updateTime = false;
protected $deleteTime = false;
/**
* 所属密钥.
* withJoin 为 LEFT JOIN 且不附加软删条件:
* 密钥不存在时关联字段为 null、软删密钥仍可 join 出delete_time > 0
* 前端据 mcp_key.title / mcp_key.delete_time 兜底显示"(已删除)#id"。
*/
public function mcpKey()
{
return $this->belongsTo('app\admin\model\SystemMcpKey', 'key_id', 'id');
}
}