feat(models): add 5 runtime table JSONs + pipeline_tasks retry_count/last_error
This commit is contained in:
parent
83d11772d5
commit
e0efcfc7db
43
models/pipeline_git_locks.json
Normal file
43
models/pipeline_git_locks.json
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"summary": [
|
||||
{
|
||||
"name": "pipeline_git_locks",
|
||||
"title": "git串行锁",
|
||||
"primary": [
|
||||
"lock_key"
|
||||
],
|
||||
"catelog": "entity"
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"name": "lock_key",
|
||||
"title": "锁键(仓库路径sha256)",
|
||||
"type": "str",
|
||||
"length": 64,
|
||||
"nullable": "no"
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"title": "持有者令牌",
|
||||
"type": "str",
|
||||
"length": 64,
|
||||
"nullable": "no"
|
||||
},
|
||||
{
|
||||
"name": "expires_at",
|
||||
"title": "过期时间",
|
||||
"type": "datetime",
|
||||
"nullable": "no"
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
{
|
||||
"name": "idx_expires",
|
||||
"idxtype": "index",
|
||||
"idxfields": [
|
||||
"expires_at"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
160
models/pipeline_llm_tokens.json
Normal file
160
models/pipeline_llm_tokens.json
Normal file
@ -0,0 +1,160 @@
|
||||
{
|
||||
"summary": [
|
||||
{
|
||||
"name": "pipeline_llm_tokens",
|
||||
"title": "LLM短期令牌",
|
||||
"primary": [
|
||||
"id"
|
||||
],
|
||||
"catelog": "entity"
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"name": "id",
|
||||
"title": "主键ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": "no"
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"title": "令牌",
|
||||
"type": "str",
|
||||
"length": 80,
|
||||
"nullable": "no"
|
||||
},
|
||||
{
|
||||
"name": "org_id",
|
||||
"title": "机构ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": "no",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"name": "project_id",
|
||||
"title": "项目ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": "no",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"name": "task_id",
|
||||
"title": "任务ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": "no",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"name": "model_name",
|
||||
"title": "模型名",
|
||||
"type": "str",
|
||||
"length": 100,
|
||||
"nullable": "no",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"name": "purpose",
|
||||
"title": "用途",
|
||||
"type": "str",
|
||||
"length": 100,
|
||||
"nullable": "no",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"title": "状态",
|
||||
"type": "str",
|
||||
"length": 20,
|
||||
"nullable": "no",
|
||||
"default": "active"
|
||||
},
|
||||
{
|
||||
"name": "expires_at",
|
||||
"title": "过期时间",
|
||||
"type": "datetime",
|
||||
"nullable": "no"
|
||||
},
|
||||
{
|
||||
"name": "max_calls",
|
||||
"title": "最大调用次数",
|
||||
"type": "int",
|
||||
"nullable": "no",
|
||||
"default": "500"
|
||||
},
|
||||
{
|
||||
"name": "call_count",
|
||||
"title": "已调用次数",
|
||||
"type": "int",
|
||||
"nullable": "no",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"name": "prompt_tokens",
|
||||
"title": "输入tokens累计",
|
||||
"type": "bigint",
|
||||
"nullable": "no",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"name": "completion_tokens",
|
||||
"title": "输出tokens累计",
|
||||
"type": "bigint",
|
||||
"nullable": "no",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"name": "created_by",
|
||||
"title": "创建人",
|
||||
"type": "str",
|
||||
"length": 64,
|
||||
"nullable": "no",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"name": "created_at",
|
||||
"title": "创建时间",
|
||||
"type": "timestamp",
|
||||
"nullable": "no"
|
||||
},
|
||||
{
|
||||
"name": "last_used_at",
|
||||
"title": "最后使用时间",
|
||||
"type": "datetime"
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
{
|
||||
"name": "uk_token",
|
||||
"idxtype": "unique",
|
||||
"idxfields": [
|
||||
"token"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_org",
|
||||
"idxtype": "index",
|
||||
"idxfields": [
|
||||
"org_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_project",
|
||||
"idxtype": "index",
|
||||
"idxfields": [
|
||||
"project_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_status_exp",
|
||||
"idxtype": "index",
|
||||
"idxfields": [
|
||||
"status",
|
||||
"expires_at"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
80
models/pipeline_session_settings.json
Normal file
80
models/pipeline_session_settings.json
Normal file
@ -0,0 +1,80 @@
|
||||
{
|
||||
"summary": [
|
||||
{
|
||||
"name": "pipeline_session_settings",
|
||||
"title": "会话设置",
|
||||
"primary": [
|
||||
"id"
|
||||
],
|
||||
"catelog": "entity"
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"name": "id",
|
||||
"title": "主键ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": "no"
|
||||
},
|
||||
{
|
||||
"name": "session_id",
|
||||
"title": "会话ID",
|
||||
"type": "str",
|
||||
"length": 64,
|
||||
"nullable": "no"
|
||||
},
|
||||
{
|
||||
"name": "user_id",
|
||||
"title": "用户ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": "no"
|
||||
},
|
||||
{
|
||||
"name": "current_project_id",
|
||||
"title": "当前项目ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": "no",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"name": "current_iteration_id",
|
||||
"title": "当前迭代ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": "no",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"name": "created_at",
|
||||
"title": "创建时间",
|
||||
"type": "timestamp",
|
||||
"nullable": "no"
|
||||
},
|
||||
{
|
||||
"name": "updated_at",
|
||||
"title": "更新时间",
|
||||
"type": "timestamp",
|
||||
"nullable": "no"
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
{
|
||||
"name": "uk_user_session",
|
||||
"idxtype": "unique",
|
||||
"idxfields": [
|
||||
"user_id",
|
||||
"session_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_session",
|
||||
"idxtype": "index",
|
||||
"idxfields": [
|
||||
"session_id"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -20,6 +20,8 @@
|
||||
{"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"}
|
||||
],
|
||||
|
||||
90
models/sd_deploy_accounts.json
Normal file
90
models/sd_deploy_accounts.json
Normal file
@ -0,0 +1,90 @@
|
||||
{
|
||||
"summary": [
|
||||
{
|
||||
"name": "sd_deploy_accounts",
|
||||
"title": "部署账号",
|
||||
"primary": [
|
||||
"id"
|
||||
],
|
||||
"catelog": "entity"
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"name": "id",
|
||||
"title": "主键ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": "no"
|
||||
},
|
||||
{
|
||||
"name": "user_id",
|
||||
"title": "用户ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": "no"
|
||||
},
|
||||
{
|
||||
"name": "account_name",
|
||||
"title": "账号名称",
|
||||
"type": "str",
|
||||
"length": 64,
|
||||
"nullable": "no"
|
||||
},
|
||||
{
|
||||
"name": "deploy_dir",
|
||||
"title": "部署目录",
|
||||
"type": "str",
|
||||
"length": 500,
|
||||
"nullable": "no"
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"title": "状态",
|
||||
"type": "str",
|
||||
"length": 20,
|
||||
"nullable": "no",
|
||||
"default": "active"
|
||||
},
|
||||
{
|
||||
"name": "sandbox_config",
|
||||
"title": "沙箱配置",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "created_at",
|
||||
"title": "创建时间",
|
||||
"type": "timestamp",
|
||||
"nullable": "no"
|
||||
},
|
||||
{
|
||||
"name": "updated_at",
|
||||
"title": "更新时间",
|
||||
"type": "timestamp",
|
||||
"nullable": "no"
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
{
|
||||
"name": "uk_account_name",
|
||||
"idxtype": "unique",
|
||||
"idxfields": [
|
||||
"account_name"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "uk_user_id",
|
||||
"idxtype": "unique",
|
||||
"idxfields": [
|
||||
"user_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_status",
|
||||
"idxtype": "index",
|
||||
"idxfields": [
|
||||
"status"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
95
models/sd_work_envs.json
Normal file
95
models/sd_work_envs.json
Normal file
@ -0,0 +1,95 @@
|
||||
{
|
||||
"summary": [
|
||||
{
|
||||
"name": "sd_work_envs",
|
||||
"title": "工作环境",
|
||||
"primary": [
|
||||
"id"
|
||||
],
|
||||
"catelog": "entity"
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"name": "id",
|
||||
"title": "主键ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": "no"
|
||||
},
|
||||
{
|
||||
"name": "owner_type",
|
||||
"title": "归属类型",
|
||||
"type": "str",
|
||||
"length": 10,
|
||||
"nullable": "no"
|
||||
},
|
||||
{
|
||||
"name": "owner_id",
|
||||
"title": "归属ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": "no"
|
||||
},
|
||||
{
|
||||
"name": "mode",
|
||||
"title": "模式",
|
||||
"type": "str",
|
||||
"length": 10,
|
||||
"nullable": "no",
|
||||
"default": "local"
|
||||
},
|
||||
{
|
||||
"name": "remote_host",
|
||||
"title": "远程主机",
|
||||
"type": "str",
|
||||
"length": 200
|
||||
},
|
||||
{
|
||||
"name": "remote_port",
|
||||
"title": "远程端口",
|
||||
"type": "int",
|
||||
"default": "22"
|
||||
},
|
||||
{
|
||||
"name": "remote_user",
|
||||
"title": "远程用户",
|
||||
"type": "str",
|
||||
"length": 100
|
||||
},
|
||||
{
|
||||
"name": "remote_key_path",
|
||||
"title": "远程密钥路径",
|
||||
"type": "str",
|
||||
"length": 500
|
||||
},
|
||||
{
|
||||
"name": "remote_dir",
|
||||
"title": "远程目录",
|
||||
"type": "str",
|
||||
"length": 200
|
||||
},
|
||||
{
|
||||
"name": "created_at",
|
||||
"title": "创建时间",
|
||||
"type": "timestamp",
|
||||
"nullable": "no"
|
||||
},
|
||||
{
|
||||
"name": "updated_at",
|
||||
"title": "更新时间",
|
||||
"type": "timestamp",
|
||||
"nullable": "no"
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
{
|
||||
"name": "uk_owner",
|
||||
"idxtype": "unique",
|
||||
"idxfields": [
|
||||
"owner_type",
|
||||
"owner_id"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user