Files
admin f9899ea207 feat: TDS × SSWFLOW 胶水全 V0–V1.4 落地 + DB 0813 v2 导出
V0 触发链 + 回调链(架构原承诺「SSWFLOW 被合约驱动调用」)
- tds/ContractSswflowTrigger: 合约双签 → 解析 f_policy_content.sswflowFlowId → SswflowClient.startRun → 回写 f_flow_run_id
- sswflow/FlowRunInternalController: /Internal/Start 白名单 App-Code (tds/tdc)
- sswflow/TdsCallbackClient + tds/RunCallbackService: 终态回调 → tds_chain_evidence (bizType=SSW_FLOW_RUN_FINISH)

V1.1 合约触发 + V1.2 dataset 同步 + V1.3 对账调度 + V1.4 TDC 直触发
- tds/DataProductDatasetSyncer: 上架 → /Dataset/Internal/Sync 按 f_external_ref='tds:dataProduct:<id>' upsert
- tds/FlowRunReconciliationScheduler: @Scheduled cron 扫合约漏单 → SswflowClient.getRun → 终态写 ledger + f_quota_used++
- tdc/DeliveryTaskController + TdcSswflowClient: /TriggerFlow 走 Internal/Start (trigger=DELIVERY_DIRECT,绕合约)

3 个 migration(必须按 V1.4→V1.5→V1.1 顺序跑)
- boot/db/tds/V1.4.0__tds_contract_flow_run_id.sql: tds_contract.f_flow_run_id + idx
- boot/db/tds/V1.5.0__tds_billing_ledger_run_id.sql: tds_billing_ledger.f_run_id + idx
- boot/db/sswflow/V1.1.0__dataset_external_ref.sql: dataset.f_external_ref + unique idx

配置 + 文档
- application.yml: exclude-url 加 Dataset/Internal/** + ssw.reconciliation 默认 + ssw.tds.callback.*
- docs/tds/SSWFLOW_BINDING.md: §10 V1.1–V1.4 全标 ✅
- docs/db/0813/{sswflow,tds,tdc,j7}/: schema 含新字段
2026-08-13 16:38:01 +08:00

393 lines
8.6 KiB
JSON

{
"database": "sswflow",
"schema": "public",
"exported_at": "2026-08-13 16:37:13",
"note": "schema-only; no data exported",
"tables": [
{
"name": "artifact",
"rows": 462,
"size": "408 kB",
"columns": [
"f_id",
"f_run_id",
"f_step_id",
"f_port_key",
"f_type",
"f_title",
"f_summary",
"f_columns",
"f_rows",
"f_metrics",
"f_uri",
"f_row_count",
"f_tenant_id",
"f_sort_code",
"f_creator_time",
"f_creator_user_id",
"f_last_modify_time",
"f_last_modify_user_id",
"f_delete_mark",
"f_delete_time",
"f_delete_user_id",
"f_flow_id",
"f_flow_task_id",
"f_flow_state"
],
"table_comment": "步骤产物"
},
{
"name": "dataset",
"rows": 10,
"size": "80 kB",
"columns": [
"f_id",
"f_dataset_code",
"f_name",
"f_party_id",
"f_datasource_id",
"f_storage_type",
"f_location",
"f_desc",
"f_row_count",
"f_columns",
"f_tenant_id",
"f_sort_code",
"f_creator_time",
"f_creator_user_id",
"f_last_modify_time",
"f_last_modify_user_id",
"f_delete_mark",
"f_delete_time",
"f_delete_user_id",
"f_flow_id",
"f_flow_task_id",
"f_flow_state",
"f_external_ref"
],
"table_comment": "数据集"
},
{
"name": "dataset_auth",
"rows": 9,
"size": "64 kB",
"columns": [
"f_id",
"f_dataset_id",
"f_project_id",
"f_auth_status",
"f_auth_time",
"f_auth_user_id",
"f_expire_time",
"f_reject_reason",
"f_tenant_id",
"f_sort_code",
"f_creator_time",
"f_creator_user_id",
"f_last_modify_time",
"f_last_modify_user_id",
"f_delete_mark",
"f_delete_time",
"f_delete_user_id",
"f_flow_id",
"f_flow_task_id",
"f_flow_state"
],
"table_comment": "数据授权"
},
{
"name": "dataset_auth_vote",
"rows": 16,
"size": "64 kB",
"columns": [
"f_id",
"f_auth_id",
"f_party_id",
"f_vote_status",
"f_vote_time",
"f_vote_user_id",
"f_comment",
"f_tenant_id",
"f_sort_code",
"f_creator_time",
"f_creator_user_id",
"f_last_modify_time",
"f_last_modify_user_id",
"f_delete_mark",
"f_delete_time",
"f_delete_user_id"
],
"table_comment": "数据授权投票"
},
{
"name": "datasource",
"rows": 1,
"size": "48 kB",
"columns": [
"f_id",
"f_name",
"f_party_id",
"f_type",
"f_config",
"f_status",
"f_desc",
"f_tenant_id",
"f_sort_code",
"f_creator_time",
"f_creator_user_id",
"f_last_modify_time",
"f_last_modify_user_id",
"f_delete_mark",
"f_delete_time",
"f_delete_user_id",
"f_flow_id",
"f_flow_task_id",
"f_flow_state"
],
"table_comment": "数据源"
},
{
"name": "flow",
"rows": 87,
"size": "288 kB",
"columns": [
"f_id",
"f_project_id",
"f_name",
"f_desc",
"f_steps",
"f_edges",
"f_last_run_id",
"f_last_run_status",
"f_last_run_time",
"f_tenant_id",
"f_sort_code",
"f_creator_time",
"f_creator_user_id",
"f_last_modify_time",
"f_last_modify_user_id",
"f_delete_mark",
"f_delete_time",
"f_delete_user_id",
"f_flow_id",
"f_flow_task_id",
"f_flow_state"
],
"table_comment": "流程"
},
{
"name": "flow_run",
"rows": 80,
"size": "288 kB",
"columns": [
"f_id",
"f_flow_id",
"f_flow_name",
"f_project_id",
"f_status",
"f_trigger",
"f_operator",
"f_start_time",
"f_end_time",
"f_cost_ms",
"f_error_msg",
"f_cancelled_mark",
"f_steps_snapshot",
"f_edges_snapshot",
"f_tenant_id",
"f_sort_code",
"f_creator_time",
"f_creator_user_id",
"f_last_modify_time",
"f_last_modify_user_id",
"f_delete_mark",
"f_delete_time",
"f_delete_user_id",
"f_flow_task_id",
"f_flow_state",
"f_run_mode",
"f_selected_steps",
"f_base_run_id"
],
"table_comment": "流程运行实例"
},
{
"name": "flow_schedule",
"rows": 2,
"size": "32 kB",
"columns": [
"f_id",
"f_flow_id",
"f_project_id",
"f_name",
"f_cron",
"f_enabled_mark",
"f_next_fire_time",
"f_last_fire_time",
"f_last_run_id",
"f_last_status",
"f_misfire_policy",
"f_run_scope",
"f_tenant_id",
"f_sort_code",
"f_creator_time",
"f_creator_user_id",
"f_last_modify_time",
"f_last_modify_user_id",
"f_delete_mark",
"f_delete_time",
"f_delete_user_id"
],
"table_comment": null
},
{
"name": "flow_step_run",
"rows": 512,
"size": "256 kB",
"columns": [
"f_id",
"f_run_id",
"f_step_id",
"f_operator_key",
"f_label",
"f_status",
"f_progress",
"f_seq",
"f_start_time",
"f_end_time",
"f_cost_ms",
"f_error_msg",
"f_parties",
"f_params_snapshot",
"f_tenant_id",
"f_sort_code",
"f_creator_time",
"f_creator_user_id",
"f_last_modify_time",
"f_last_modify_user_id",
"f_delete_mark",
"f_delete_time",
"f_delete_user_id",
"f_flow_id",
"f_flow_task_id",
"f_flow_state"
],
"table_comment": "步骤运行记录"
},
{
"name": "party",
"rows": 6,
"size": "64 kB",
"columns": [
"f_id",
"f_party_code",
"f_name",
"f_organize_id",
"f_org_name",
"f_endpoint",
"f_role",
"f_status",
"f_self_mark",
"f_cert_pem",
"f_desc",
"f_last_heartbeat_time",
"f_tenant_id",
"f_sort_code",
"f_creator_time",
"f_creator_user_id",
"f_last_modify_time",
"f_last_modify_user_id",
"f_delete_mark",
"f_delete_time",
"f_delete_user_id",
"f_flow_id",
"f_flow_task_id",
"f_flow_state"
],
"table_comment": "参与方"
},
{
"name": "project",
"rows": 8,
"size": "64 kB",
"columns": [
"f_id",
"f_project_code",
"f_name",
"f_desc",
"f_owner_party_id",
"f_compute_mode",
"f_status",
"f_tenant_id",
"f_sort_code",
"f_creator_time",
"f_creator_user_id",
"f_last_modify_time",
"f_last_modify_user_id",
"f_delete_mark",
"f_delete_time",
"f_delete_user_id",
"f_flow_id",
"f_flow_task_id",
"f_flow_state"
],
"table_comment": "项目"
},
{
"name": "project_party",
"rows": 15,
"size": "64 kB",
"columns": [
"f_id",
"f_project_id",
"f_party_id",
"f_role",
"f_join_status",
"f_invite_time",
"f_join_time",
"f_tenant_id",
"f_sort_code",
"f_creator_time",
"f_creator_user_id",
"f_last_modify_time",
"f_last_modify_user_id",
"f_delete_mark",
"f_delete_time",
"f_delete_user_id",
"f_flow_id",
"f_flow_task_id",
"f_flow_state"
],
"table_comment": "项目参与方"
},
{
"name": "run_event",
"rows": 2643,
"size": "920 kB",
"columns": [
"f_id",
"f_run_id",
"f_step_id",
"f_type",
"f_status",
"f_progress",
"f_level",
"f_message",
"f_ts",
"f_tenant_id",
"f_sort_code",
"f_creator_time",
"f_creator_user_id",
"f_last_modify_time",
"f_last_modify_user_id",
"f_delete_mark",
"f_delete_time",
"f_delete_user_id",
"f_flow_id",
"f_flow_task_id",
"f_flow_state"
],
"table_comment": "运行期事件"
}
]
}