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 / dwd明细数据层
-- 生成日期2026-03-15
-- 生成日期2026-04-05
-- 来源:测试库(通过脚本自动导出)
-- =============================================================================
@@ -284,7 +284,11 @@ CREATE TABLE dwd.dim_member_ex (
scd2_start_time timestamp with time zone NOT NULL,
scd2_end_time timestamp with time zone,
scd2_is_current integer,
scd2_version integer
scd2_version integer,
other_pay_money_sum numeric(18,2),
last_consume_time timestamp with time zone,
non_consume_day_num integer,
first_consumption integer
);
CREATE TABLE dwd.dim_site (
@@ -617,7 +621,9 @@ CREATE TABLE dwd.dwd_assistant_service_log_ex (
composite_grade_time timestamp with time zone,
assistant_team_name text,
operator_id bigint,
operator_name text
operator_name text,
deduct_leave_seconds integer DEFAULT 0,
order_from integer
);
CREATE TABLE dwd.dwd_goods_stock_movement (
@@ -660,7 +666,8 @@ CREATE TABLE dwd.dwd_goods_stock_summary (
current_stock numeric(18,4),
site_id bigint,
tenant_id bigint,
fetched_at timestamp with time zone NOT NULL
fetched_at timestamp with time zone NOT NULL,
create_time timestamp with time zone
);
CREATE TABLE dwd.dwd_groupbuy_redemption (
@@ -986,7 +993,8 @@ CREATE TABLE dwd.dwd_settlement_head_ex (
salesman_name character varying(100),
order_remark character varying(255),
operator_id bigint,
salesman_user_id bigint
salesman_user_id bigint,
order_from integer
);
CREATE TABLE dwd.dwd_store_goods_sale (
@@ -1045,7 +1053,10 @@ CREATE TABLE dwd.dwd_store_goods_sale_ex (
push_money numeric(18,2),
is_single_order integer,
sales_type integer,
operator_id bigint
operator_id bigint,
activity_amount numeric(18,2) DEFAULT 0,
activity_id bigint DEFAULT 0,
order_from integer
);
CREATE TABLE dwd.dwd_table_fee_adjust (
@@ -1128,7 +1139,8 @@ CREATE TABLE dwd.dwd_table_fee_log_ex (
operator_id bigint,
salesman_user_id bigint,
salesman_org_id bigint,
order_consumption_type integer
order_consumption_type integer,
order_from integer
);
-- 约束(主键 / 唯一 / 外键)