chore: 文档与 IDE 配置整理

- .kiro/specs/ → docs/specs/(41 个历史需求 spec 迁移,移除 .config.kiro)
- CLAUDE.md 三层拆分:根文件精简 + apps/backend/CLAUDE.md + .claude/commands/
- 新增 /spec-close、/pre-change 两个工作流命令
- DDL 基线刷新(从测试库重新导出 11 个文件,dws 35→38 表,biz 18→21 表)
- BD_Manual → BD_manual 命名统一(48 个文件)
- 修复 3 处文档与数据库不一致(auth.users.status 默认值、scheduled_tasks 字段、RLS 视图数)
- 新增 BD_manual_public_rbac_tables.md(public schema 8 张 RBAC/工作流表)
- 合并 biz.trigger_jobs 文档(10→12 字段,归档独立文档)
- docs/database/README.md 索引更新

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Neo
2026-04-06 00:02:37 +08:00
parent 8228b3fa37
commit 70324d8542
185 changed files with 13595 additions and 1219 deletions

View File

@@ -1,6 +1,6 @@
-- =============================================================================
-- etl_feiqiu / ods原始数据层
-- 生成日期2026-03-15
-- 生成日期2026-04-05
-- 来源:测试库(通过脚本自动导出)
-- =============================================================================
@@ -148,7 +148,9 @@ CREATE TABLE ods.assistant_service_records (
content_hash text NOT NULL,
source_file text,
source_endpoint text,
fetched_at timestamp with time zone DEFAULT now()
fetched_at timestamp with time zone DEFAULT now(),
deduct_leave_seconds integer DEFAULT 0,
order_from integer
);
CREATE TABLE ods.goods_stock_movements (
@@ -198,7 +200,8 @@ CREATE TABLE ods.goods_stock_summary (
source_endpoint text,
fetched_at timestamp with time zone DEFAULT now(),
payload jsonb NOT NULL,
siteid bigint
siteid bigint,
createtime timestamp without time zone
);
CREATE TABLE ods.group_buy_package_details (
@@ -394,7 +397,11 @@ CREATE TABLE ods.member_profiles (
source_endpoint text,
fetched_at timestamp with time zone DEFAULT now(),
payload jsonb NOT NULL,
birthday date
birthday date,
other_pay_money_sum numeric(18,2),
last_consume_time timestamp without time zone,
non_consume_day_num integer,
first_consumption integer
);
CREATE TABLE ods.member_stored_value_cards (
@@ -719,7 +726,8 @@ CREATE TABLE ods.settlement_records (
source_file text,
source_endpoint text,
fetched_at timestamp with time zone DEFAULT now(),
payload jsonb NOT NULL
payload jsonb NOT NULL,
orderfrom integer
);
CREATE TABLE ods.site_tables_master (
@@ -939,7 +947,10 @@ CREATE TABLE ods.store_goods_sales_records (
content_hash text NOT NULL,
source_file text,
source_endpoint text,
fetched_at timestamp with time zone DEFAULT now()
fetched_at timestamp with time zone DEFAULT now(),
activity_amount numeric(18,2) DEFAULT 0,
activity_id bigint DEFAULT 0,
order_from integer
);
CREATE TABLE ods.table_fee_discount_records (
@@ -1025,7 +1036,8 @@ CREATE TABLE ods.table_fee_transactions (
content_hash text NOT NULL,
source_file text,
source_endpoint text,
fetched_at timestamp with time zone DEFAULT now()
fetched_at timestamp with time zone DEFAULT now(),
order_from integer
);
CREATE TABLE ods.tenant_goods_master (