SPAY4 · CURRENT AUTHORITY

Schema Foundation

CURRENT

當前完整 schema 聯集為 14 Core + 55 Domain = 69 logical relations(52 foundation-1 #546 removal+Overview 2+Withdrawal 1+2 Notification+1 HOUSE balance+1 BO alert+1 Payment Account limit+5 Supply Channel+2 Supply Channel daily quota+1 Supply Channel transaction+1 Channel report+1 Payment Account identity history),沒有 database foreign key。

identity、owner、unique grain 與 query-shaped index 必須逐表審核。

用途與具體情境

當前完整 schema 聯集為 14 Core + 55 Domain = 69 logical relations(52 foundation-1 #546 removal+Overview 2+Withdrawal 1+2 Notification+1 HOUSE balance+1 BO alert+1 Payment Account limit+5 Supply Channel+2 Supply Channel daily quota+1 Supply Channel transaction+1 Channel report+1 Payment Account identity history),沒有 database foreign key。 例如:在安排建置或核對資料關係前,先確認這份摘要的適用範圍;來源不能代替產品驗收。

展開技術摘要與圖表

Schema 版本與適用範圍

52 foundation baseline - 1 #546 removal + 2 Overview + 1 Withdrawal + 2 Notification + 1 HOUSE balance + 1 BO alert + 1 Payment Account limit + 5 Supply Channel + 2 Supply Channel daily quota + 1 Supply Channel transaction + 1 Channel report + 1 Payment Account identity history = 69 current union。52-table foundation 詳細審核保留原版本;Overview checkpoint 是 54,Withdrawal 加 Notification exact 2 overlays 後是 57,再加 HOUSE balance exact 1 overlay 後是 58,再加 BO alert exact 1 overlay 後是 59,再加 Payment Account limit exact 1 overlay 後是 60,再加 Supply Channel exact 5 overlay 後是 65,再加 Supply Channel daily quota exact 2 overlay 後是 67,再加 Supply Channel transaction exact 1 overlay 後是 68,再加 Channel report exact 1 overlay 後是 69,#546 移除 foundation 的 Withdrawal recovery case 歷史表後是 68,再加 Payment Account identity history exact 1 overlay 後是當前 fresh DDL 69。資料表數不是功能完成證據。

來源:sql/V4/README.md/sql/V4/ddl.sql 的 exact foundation/Overview/Withdrawal/Notification inventories;foundation contract、Overview overlay 與驗收界線、Withdrawal operation authority。不授權 SQL,不修改 DDL/seed;existing target 不得重跑 fresh DDL、清庫或 backfill。

identity、owner、unique grain 與 query-shaped index 必須逐表審核。
14 Core + 55 Domain = 69 relations;所有關係為 logical relation。

Core · 14

currencybankagentnotification_provider_sourcecredential_referencecredential_secretagent_banksystem_groupsystem_methodrolerole_methodusersystem_configagent_system_config

Domain · 55

external_api_replay_noncesuppliersupply_gatewaysupply_accountdomain_audit_logsupply_pt_policysupply_pt_revisionsupply_pt_revision_linesupply_gateway_direction_configsupply_gateway_agent_allocationsupply_eligible_factsupply_eligible_fact_correctionsupply_eligible_fact_projection_queuesupply_eligible_fact_projection_failure_attemptsupply_aggregate_projection_watermarksupply_financial_hourly_aggregatesupply_cardholdersupply_cardholder_sessionsupply_cardholder_device_tokensupply_cardholder_notificationpayment_account_applicationpayment_accountpayment_account_balance_loghouse_cardpayment_account_daily_countersupply_cardholder_daily_assignment_counteragent_api_order_claimsupply_deposit_ordersupply_withdrawal_ordersupply_order_assignment_attemptagent_callback_outboxpayment_account_reservationsupply_order_proofsupply_deposit_operationhouse_card_transactionhouse_card_daily_counterhouse_card_deposit_reservationpayment_account_identity_guardpayment_account_overview_commandsupply_withdrawal_operationsupply_notification_batchsupply_notification_batch_recipienthouse_card_balance_logbo_alertpayment_account_currency_limitsupply_channelsupplier_external_provider_secretsupply_channel_agent_allocationsupplier_credential_referencesupplier_credential_secretsupply_channel_daily_countersupply_channel_deposit_reservationsupply_channel_transactionagent_receiver_aliaspayment_account_identity_history

Current baseline

完整候選 schema 是 14 Core + 55 Domain = 69 relations;服務層 transaction 與 fail-closed guard 維護 logical relation。

  • Supply principal:supply_account。
  • Withdrawal:僅 Payment Account reservation。
  • HOUSE:僅 Deposit、LINE inbound evidence 與 HOUSE Deposit quota/reservation。

圖表用來定位元件與資料責任,不表示完整需求已實作或驗證。

來源:concepts/schema-foundation.md(SQL 初始化頁除外)。

圖片預覽