fix(models): pipeline_conversations 孤儿表归籍本模块——补models定义(13列与活表逐列对齐,唯一写入方agent_loop_v2._save_turn)+README数据表登记;字段顺序含m0003补列session_id在尾;task_id/step_name/attachments/msg_type/org_id为预留列(活表395行实测零写入),保留定义与活表一致

This commit is contained in:
ymq 2026-09-10 15:30:40 +08:00
parent 92cdafdd22
commit b8a2aeadb7
2 changed files with 33 additions and 0 deletions

View File

@ -20,6 +20,8 @@
| pipeline_artifacts | 步骤产物 |
| pipeline_human_tasks | 人工任务 |
| pipeline_step_types | 步骤类型注册 |
| pipeline_session_settings | 会话设置(多 tab 项目上下文) |
| pipeline_conversations | 平台会话消息回放缓存2026-09-10 归籍本模块——唯一写入方 agent_loop_v2._save_turn此前是无 models 定义的孤儿表) |
## 安装

View File

@ -0,0 +1,31 @@
{
"summary": [
{
"name": "pipeline_conversations",
"title": "平台会话消息表(回放缓存)",
"primary": ["id"],
"catelog": "entity"
}
],
"fields": [
{"name": "id", "title": "主键ID", "type": "str", "length": 32, "nullable": "no"},
{"name": "pipeline_id", "title": "产线ID空串=通用会话,隔离键)", "type": "str", "length": 32, "default": ""},
{"name": "iteration_id", "title": "项目ID历史语义名存project_id", "type": "str", "length": 32, "default": ""},
{"name": "task_id", "title": "Pipeline任务ID预留当前零写入", "type": "str", "length": 32, "default": ""},
{"name": "step_name", "title": "关联步骤名(预留,当前零写入)", "type": "str", "length": 100, "default": ""},
{"name": "role", "title": "消息角色", "type": "str", "length": 20, "nullable": "no", "default": "user"},
{"name": "content", "title": "消息正文回放缓存4000字截断", "type": "text"},
{"name": "attachments", "title": "附件列表JSON预留当前零写入", "type": "text"},
{"name": "msg_type", "title": "消息类型", "type": "str", "length": 20, "default": "text"},
{"name": "org_id", "title": "组织ID预留当前零写入", "type": "str", "length": 32, "default": "0"},
{"name": "created_by", "title": "创建人用户ID", "type": "str", "length": 32, "default": ""},
{"name": "created_at", "title": "创建时间", "type": "timestamp", "nullable": "no"},
{"name": "session_id", "title": "会话ID多tab隔离键m0003补列", "type": "str", "length": 32, "default": ""}
],
"indexes": [
{"name": "idx_conv_created_by", "idxtype": "index", "idxfields": ["created_by"]},
{"name": "idx_conv_session", "idxtype": "index", "idxfields": ["session_id"]},
{"name": "idx_conv_iteration", "idxtype": "index", "idxfields": ["iteration_id"]},
{"name": "idx_conv_created", "idxtype": "index", "idxfields": ["created_at"]}
]
}