pipeline-service/models/pipeline_tasks.json

39 lines
2.4 KiB
JSON

{
"summary": [
{
"name": "pipeline_tasks",
"title": "产线任务表",
"primary": ["id"],
"catelog": "entity"
}
],
"fields": [
{"name": "id", "title": "主键ID", "type": "str", "length": 32, "nullable": "no"},
{"name": "tenant_id", "title": "租户ID", "type": "str", "length": 32, "nullable": "no"},
{"name": "pipeline_id", "title": "产线定义ID", "type": "str", "length": 32, "nullable": "no"},
{"name": "owner_id", "title": "提交人ID", "type": "str", "length": 32, "nullable": "no"},
{"name": "title", "title": "任务标题", "type": "str", "length": 255, "nullable": "no"},
{"name": "state", "title": "任务状态", "type": "str", "length": 32, "nullable": "no", "default": "submitted"},
{"name": "current_version", "title": "当前版本号", "type": "int", "nullable": "no", "default": "1"},
{"name": "params", "title": "提交参数", "type": "text"},
{"name": "role", "title": "目标角色", "type": "str", "length": 32, "nullable": "no", "default": ""},
{"name": "claimed_by", "title": "认领agent标识", "type": "str", "length": 64, "nullable": "yes"},
{"name": "parent_id", "title": "父任务ID(分解后子任务指向父)", "type": "str", "length": 32, "nullable": "yes"},
{"name": "depends_on", "title": "依赖任务ID列表(JSON数组,依赖完成才可认领)", "type": "text"},
{"name": "retry_count", "title": "重试次数", "type": "int", "nullable": "no", "default": "0"},
{"name": "last_error", "title": "最后错误", "type": "text"},
{"name": "created_at", "title": "创建时间", "type": "timestamp", "nullable": "no"},
{"name": "updated_at", "title": "更新时间", "type": "timestamp", "nullable": "no"}
],
"indexes": [
{"name": "idx_pt_tenant", "idxtype": "index", "idxfields": ["tenant_id"]},
{"name": "idx_pt_pipeline", "idxtype": "index", "idxfields": ["pipeline_id"]},
{"name": "idx_pt_owner", "idxtype": "index", "idxfields": ["owner_id"]},
{"name": "idx_pt_state", "idxtype": "index", "idxfields": ["state"]},
{"name": "idx_pt_role", "idxtype": "index", "idxfields": ["role"]}
],
"codes": [
{"field": "state", "table": "appcodes_kv", "valuefield": "k", "textfield": "v", "cond": "parentid='task_state'"}
]
}