refactor(model-gateway): 重构代码结构并优化数据库查询

This commit is contained in:
2026-06-03 18:37:18 +08:00
parent 05cf1b9828
commit b2cad4cac2
10 changed files with 190 additions and 470 deletions

View File

@@ -5,6 +5,7 @@ import "gitea.com/red-future/common/beans"
type ComposeSession struct {
beans.SQLBaseDO `orm:",inline"`
SessionId string `orm:"session_id" json:"sessionId"`
NodeId string `orm:"node_id" json:"nodeId"`
RequestContent map[string]any `orm:"request_content" json:"requestContent"`
ResponseContent map[string]any `orm:"response_content" json:"responseContent"`
Remark string `orm:"remark" json:"remark"`
@@ -13,6 +14,7 @@ type ComposeSession struct {
type composeSessionCol struct {
beans.SQLBaseCol
SessionId string
NodeId string
RequestContent string
ResponseContent string
Remark string
@@ -21,6 +23,7 @@ type composeSessionCol struct {
var ComposeSessionCol = composeSessionCol{
SQLBaseCol: beans.DefSQLBaseCol,
SessionId: "session_id",
NodeId: "node_id",
RequestContent: "request_content",
ResponseContent: "response_content",
Remark: "remark",