mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-09-05 07:15:31 +08:00
feat(mcp): MCP 密钥管理后台(CURD 重组 Base/App,密钥仅创建时明文展示)
This commit is contained in:
25
database/migrations/20260816203003_system_mcp_log.php
Normal file
25
database/migrations/20260816203003_system_mcp_log.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
|
||||
class SystemMcpLog extends Migrator
|
||||
{
|
||||
/**
|
||||
* MCP调用日志表.
|
||||
*
|
||||
* 仅 create_time(写入后不变),无 update_time / delete_time。
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('system_mcp_log')
|
||||
->setComment('MCP调用日志表')
|
||||
->addColumn('key_id', 'biginteger', ['limit' => 11, 'null' => true, 'signed' => false, 'comment' => '密钥ID'])
|
||||
->addColumn('node', 'char', ['limit' => 100, 'null' => true, 'comment' => '调用节点'])
|
||||
->addColumn('arguments', 'text', ['null' => true, 'comment' => '参数摘要JSON'])
|
||||
->addColumn('is_success', 'integer', ['limit' => 1, 'null' => true, 'default' => 1, 'comment' => '是否成功:0=失败,1=成功'])
|
||||
->addColumn('cost_ms', 'integer', ['limit' => 11, 'null' => true, 'default' => 0, 'comment' => '耗时毫秒'])
|
||||
->addColumn('create_time', 'integer', ['limit' => 11, 'null' => true, 'default' => 0, 'signed' => false, 'comment' => '创建时间'])
|
||||
->addIndex(['key_id'], ['name' => 'key_id'])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user