diff --git a/models/pipeline_steps.json b/models/pipeline_steps.json new file mode 100644 index 0000000..20e82a6 --- /dev/null +++ b/models/pipeline_steps.json @@ -0,0 +1,104 @@ +{ + "summary": [ + { + "name": "pipeline_steps", + "title": "产线步骤表", + "primary": [ + "id" + ], + "catelog": "entity" + } + ], + "fields": [ + { + "name": "id", + "title": "id", + "type": "str", + "length": 32, + "nullable": "no" + }, + { + "name": "pipeline_id", + "title": "所属产线", + "type": "str", + "length": 32, + "nullable": "no" + }, + { + "name": "step_order", + "title": "步骤序号", + "type": "int", + "nullable": "no" + }, + { + "name": "step_name", + "title": "步骤名称", + "type": "str", + "length": 100, + "nullable": "no" + }, + { + "name": "step_type", + "title": "步骤类型", + "type": "str", + "length": 50, + "nullable": "no" + }, + { + "name": "model_name", + "title": "调用模型名称", + "type": "str", + "length": 100 + }, + { + "name": "step_config", + "title": "步骤配置JSON", + "type": "text" + }, + { + "name": "input_schema", + "title": "输入定义JSON", + "type": "text" + }, + { + "name": "output_schema", + "title": "输出定义JSON", + "type": "text" + }, + { + "name": "timeout_seconds", + "title": "超时秒数", + "type": "int", + "default": "300" + }, + { + "name": "retry_count", + "title": "重试次数", + "type": "int", + "default": "0" + }, + { + "name": "created_at", + "title": "创建时间", + "type": "timestamp", + "nullable": "no" + } + ], + "indexes": [ + { + "name": "idx_steps_pipeline", + "idxtype": "index", + "idxfields": [ + "pipeline_id" + ] + }, + { + "name": "idx_steps_order", + "idxtype": "unique", + "idxfields": [ + "pipeline_id", + "step_order" + ] + } + ] +} diff --git a/models/pipeline_user_memory.json b/models/pipeline_user_memory.json new file mode 100644 index 0000000..66ae6a3 --- /dev/null +++ b/models/pipeline_user_memory.json @@ -0,0 +1,102 @@ +{ + "summary": [ + { + "name": "pipeline_user_memory", + "title": "用户记忆", + "primary": [ + "id" + ], + "catelog": "entity" + } + ], + "fields": [ + { + "name": "id", + "title": "主键ID", + "type": "str", + "length": 32, + "nullable": "no" + }, + { + "name": "memory_key", + "title": "记忆键", + "type": "str", + "length": 64, + "nullable": "no" + }, + { + "name": "content", + "title": "记忆内容", + "type": "text", + "nullable": "no" + }, + { + "name": "category", + "title": "分类", + "type": "str", + "length": 32, + "nullable": "no", + "default": "memory" + }, + { + "name": "scope", + "title": "作用域", + "type": "str", + "length": 32, + "nullable": "no", + "default": "global" + }, + { + "name": "scope_id", + "title": "作用域ID", + "type": "str", + "length": 64, + "nullable": "no", + "default": "" + }, + { + "name": "priority", + "title": "优先级", + "type": "int", + "nullable": "no", + "default": "0" + }, + { + "name": "access_count", + "title": "访问次数", + "type": "int", + "nullable": "no", + "default": "0" + }, + { + "name": "created_at", + "title": "创建时间", + "type": "timestamp", + "nullable": "no" + }, + { + "name": "updated_at", + "title": "更新时间", + "type": "timestamp", + "nullable": "no" + } + ], + "indexes": [ + { + "name": "uk_memory", + "idxtype": "unique", + "idxfields": [ + "memory_key", + "category" + ] + }, + { + "name": "idx_category_priority", + "idxtype": "index", + "idxfields": [ + "category", + "priority" + ] + } + ] +} diff --git a/models/pipeline_versions.json b/models/pipeline_versions.json new file mode 100644 index 0000000..0931201 --- /dev/null +++ b/models/pipeline_versions.json @@ -0,0 +1,80 @@ +{ + "summary": [ + { + "name": "pipeline_versions", + "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, + "nullable": "no" + }, + { + "name": "version", + "title": "版本号", + "type": "str", + "length": 20, + "nullable": "no" + }, + { + "name": "publish_status", + "title": "发布状态", + "type": "str", + "length": 20, + "nullable": "no", + "default": "pending" + }, + { + "name": "published_by", + "title": "发布人", + "type": "str", + "length": 32 + }, + { + "name": "published_at", + "title": "发布时间", + "type": "timestamp", + "nullable": "no" + }, + { + "name": "changelog", + "title": "变更说明", + "type": "text" + }, + { + "name": "config_snapshot", + "title": "配置快照JSON", + "type": "text" + }, + { + "name": "created_at", + "title": "创建时间", + "type": "timestamp", + "nullable": "no" + } + ], + "indexes": [ + { + "name": "idx_versions_pipeline", + "idxtype": "index", + "idxfields": [ + "pipeline_id" + ] + } + ] +} diff --git a/models/pipelines.json b/models/pipelines.json new file mode 100644 index 0000000..a5f3d5c --- /dev/null +++ b/models/pipelines.json @@ -0,0 +1,140 @@ +{ + "summary": [ + { + "name": "pipelines", + "title": "产线定义表", + "primary": [ + "id" + ], + "catelog": "entity" + } + ], + "fields": [ + { + "name": "id", + "title": "id", + "type": "str", + "length": 32, + "nullable": "no" + }, + { + "name": "name", + "title": "产线名称", + "type": "str", + "length": 200, + "nullable": "no" + }, + { + "name": "description", + "title": "产线描述", + "type": "text" + }, + { + "name": "pipeline_type", + "title": "产线类型", + "type": "str", + "length": 50, + "nullable": "no" + }, + { + "name": "version", + "title": "当前版本", + "type": "str", + "length": 20, + "default": "1.0.0" + }, + { + "name": "status", + "title": "状态", + "type": "str", + "length": 20, + "nullable": "no", + "default": "draft" + }, + { + "name": "pipeline_config", + "title": "产线配置JSON", + "type": "text" + }, + { + "name": "model_api_url", + "title": "模型API地址", + "type": "str", + "length": 500 + }, + { + "name": "model_api_key", + "title": "模型API密钥", + "type": "str", + "length": 500 + }, + { + "name": "default_model", + "title": "缺省模型", + "type": "str", + "length": 100 + }, + { + "name": "org_id", + "title": "所属机构ID", + "type": "str", + "length": 32, + "default": "0" + }, + { + "name": "created_by", + "title": "创建人", + "type": "str", + "length": 32 + }, + { + "name": "created_at", + "title": "创建时间", + "type": "timestamp", + "nullable": "no" + }, + { + "name": "updated_at", + "title": "更新时间", + "type": "timestamp", + "nullable": "no" + }, + { + "name": "agent_config", + "title": "Agent配置JSON", + "type": "text" + } + ], + "indexes": [ + { + "name": "idx_pipelines_name", + "idxtype": "index", + "idxfields": [ + "name" + ] + }, + { + "name": "idx_pipelines_status", + "idxtype": "index", + "idxfields": [ + "status" + ] + } + ], + "codes": [ + { + "field": "pipeline_type", + "table": "appcodes_kv", + "valuefield": "k", + "textfield": "v", + "cond": "parentid='pipeline_type'" + }, + { + "field": "status", + "table": "appcodes_kv", + "valuefield": "k", + "textfield": "v", + "cond": "parentid='pipeline_status'" + } + ] +}