Files
gozerosandCursor 0c45b86d67 chore: 初始化 eightbf-analysis-go(对齐 Java 会商作业服务)
Go 实现 /api/v1/analysis 契约、Demo/Live Worker、DeerFlow SSE;含设计文档与冒烟脚本。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-03 00:13:46 +08:00

36 lines
1.4 KiB
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 会商作业主表:一条记录 = 一次后台会商
-- 本机 / 正式默认走 MySQL(utf8mb4);H2 profile 仍可跑同一份(LONGTEXT≈CLOB)
CREATE TABLE IF NOT EXISTS eba_analysis_job (
id VARCHAR(64) PRIMARY KEY,
request_id VARCHAR(64),
task_id VARCHAR(128),
draft_id VARCHAR(64),
draft_key VARCHAR(255),
status VARCHAR(32) NOT NULL,
phase VARCHAR(32),
cycle INT DEFAULT 0,
active_agent_id VARCHAR(128),
consensus_percentage INT DEFAULT 0,
pending_clarification LONGTEXT,
orchestration_mode VARCHAR(32),
model VARCHAR(128),
error_message LONGTEXT,
-- 创建人账号;岗位限制与检查点见 access_json / plan_json
owner_account_id VARCHAR(128),
agents_json LONGTEXT,
chain_json LONGTEXT, -- dialogues 气泡列表
plan_json LONGTEXT, -- 检查点:seatIndex、manualIntervention、pendingInject 等
access_json LONGTEXT, -- 权限:taskOwnerAccountIds、seatAccounts、adminAccountIds
thread_ids_json LONGTEXT,
progress_json LONGTEXT,
result_json LONGTEXT,
cancel_flag TINYINT DEFAULT 0,
created_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
-- MySQL 无「IF NOT EXISTS」索引时,重复执行靠 continue-on-error 忽略
CREATE INDEX idx_eba_job_task ON eba_analysis_job(task_id);
CREATE INDEX idx_eba_job_status ON eba_analysis_job(status);
CREATE INDEX idx_eba_job_owner ON eba_analysis_job(owner_account_id);