feat: model_manage 增加 ref_system_model_id 引用列与引用 DTO
- entity/dto 落地 ref_system_model_id 字段 + ReferenceSystemModelReq/Res - DAO 新增 CountReferences / UpdateReferencesName 辅助方法 - roundtrip 单测验证 DTO→entity 映射 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+12
-1
@@ -317,4 +317,15 @@ COMMENT ON COLUMN model_gateway_model_task_start.media_type
|
||||
ALTER TABLE model_gateway_model_task_end
|
||||
ADD COLUMN IF NOT EXISTS total_cost NUMERIC DEFAULT 0;
|
||||
COMMENT ON COLUMN model_gateway_model_task_end.total_cost
|
||||
IS '本次调用总费用(元),未配置计费规则为0';
|
||||
IS '本次调用总费用(元),未配置计费规则为0';
|
||||
|
||||
-- =========================
|
||||
-- 模型引用化:model_manage 新增 ref_system_model_id(引用行指向系统模型)
|
||||
-- 系统模型 = 配置唯一来源;引用行只存 apiKey/enabled/chatModel,配置列留空
|
||||
-- =========================
|
||||
ALTER TABLE model_gateway_model_manage
|
||||
ADD COLUMN IF NOT EXISTS ref_system_model_id BIGINT DEFAULT NULL;
|
||||
COMMENT ON COLUMN model_gateway_model_manage.ref_system_model_id
|
||||
IS '引用的系统模型ID(NULL=非引用行;system_model=false 且该列非空=引用行)';
|
||||
CREATE INDEX IF NOT EXISTS idx_model_manage_ref_system_model_id
|
||||
ON model_gateway_model_manage(ref_system_model_id);
|
||||
Reference in New Issue
Block a user