瀏覽代碼

📝 docs(architecture): 更新源代码树文档,添加新业务模块

- 添加版本记录:3.3 (2025-11-12),记录新业务模块包的补充
- 补充广告管理模块(advertisements-module)的目录结构说明
- 补充商户管理模块(merchant-module)的目录结构说明
- 补充供应商管理模块(supplier-module)的目录结构说明
- 更新业务模块层依赖顺序,包含新添加的模块
yourname 1 月之前
父節點
當前提交
b0d82d0445
共有 1 個文件被更改,包括 63 次插入1 次删除
  1. 63 1
      docs/architecture/source-tree.md

+ 63 - 1
docs/architecture/source-tree.md

@@ -3,6 +3,7 @@
 ## 版本信息
 | 版本 | 日期 | 描述 | 作者 |
 |------|------|------|------|
+| 3.3 | 2025-11-12 | 补充新添加的业务模块包(广告、商户、供应商) | Winston |
 | 3.2 | 2025-11-11 | 更新包结构,添加基础设施和业务模块包 | Winston |
 | 3.1 | 2025-11-09 | 更新测试结构,清理重复测试文件 | James |
 | 3.0 | 2025-10-22 | 更新为 monorepo 结构,添加 packages/server | Winston |
@@ -185,6 +186,67 @@ d8d-mini-starter/
 │   │   │       ├── user-routes.integration.test.ts    # 用户路由集成测试
 │   │   │       └── admin-routes.integration.test.ts   # 管理员路由集成测试
 │   │   └── package.json
+│   ├── advertisements-module/  # 广告管理模块 (@d8d/advertisements-module)
+│   │   ├── src/
+│   │   │   ├── entities/
+│   │   │   │   ├── advertisement.entity.ts            # 广告实体
+│   │   │   │   └── advertisement-type.entity.ts       # 广告类型实体
+│   │   │   ├── services/
+│   │   │   │   ├── advertisement.service.ts           # 广告服务
+│   │   │   │   └── advertisement-type.service.ts      # 广告类型服务
+│   │   │   ├── schemas/
+│   │   │   │   ├── advertisement.schema.ts            # 广告Schema
+│   │   │   │   └── advertisement-type.schema.ts       # 广告类型Schema
+│   │   │   └── routes/
+│   │   │       ├── advertisements.ts                  # 广告路由
+│   │   │       └── advertisement-types.ts             # 广告类型路由
+│   │   ├── tests/
+│   │   │   └── integration/
+│   │   │       ├── advertisements.integration.test.ts # 广告集成测试
+│   │   │       └── advertisement-types.integration.test.ts # 广告类型集成测试
+│   │   └── package.json
+│   ├── merchant-module/        # 商户管理模块 (@d8d/merchant-module)
+│   │   ├── src/
+│   │   │   ├── entities/
+│   │   │   │   └── merchant.entity.ts                 # 商户实体
+│   │   │   ├── services/
+│   │   │   │   └── merchant.service.ts                # 商户服务
+│   │   │   ├── schemas/
+│   │   │   │   ├── merchant.schema.ts                 # 商户Schema
+│   │   │   │   ├── user-merchant.schema.ts            # 用户专用Schema
+│   │   │   │   └── admin-merchant.schema.ts           # 管理员专用Schema
+│   │   │   ├── types/
+│   │   │   │   └── merchant.types.ts                  # 商户类型定义
+│   │   │   └── routes/
+│   │   │       ├── index.ts                           # 路由导出
+│   │   │       ├── user-routes.ts                     # 用户路由
+│   │   │       └── admin-routes.ts                    # 管理员路由
+│   │   ├── tests/
+│   │   │   └── integration/
+│   │   │       ├── user-routes.integration.test.ts    # 用户路由集成测试
+│   │   │       └── admin-routes.integration.test.ts   # 管理员路由集成测试
+│   │   └── package.json
+│   ├── supplier-module/        # 供应商管理模块 (@d8d/supplier-module)
+│   │   ├── src/
+│   │   │   ├── entities/
+│   │   │   │   └── supplier.entity.ts                 # 供应商实体
+│   │   │   ├── services/
+│   │   │   │   └── supplier.service.ts                # 供应商服务
+│   │   │   ├── schemas/
+│   │   │   │   ├── supplier.schema.ts                 # 供应商Schema
+│   │   │   │   ├── user-supplier.schema.ts            # 用户专用Schema
+│   │   │   │   └── admin-supplier.schema.ts           # 管理员专用Schema
+│   │   │   ├── types/
+│   │   │   │   └── supplier.types.ts                  # 供应商类型定义
+│   │   │   └── routes/
+│   │   │       ├── index.ts                           # 路由导出
+│   │   │       ├── user-routes.ts                     # 用户路由
+│   │   │       └── admin-routes.ts                    # 管理员路由
+│   │   ├── tests/
+│   │   │   └── integration/
+│   │   │       ├── user-routes.integration.test.ts    # 用户路由集成测试
+│   │   │       └── admin-routes.integration.test.ts   # 管理员路由集成测试
+│   │   └── package.json
 │   └── geo-areas/              # 地区模块 (@d8d/geo-areas)
 │       ├── src/
 │       │   ├── modules/areas/
@@ -268,7 +330,7 @@ d8d-mini-starter/
 - **包架构层次**:
   - **基础设施层**: shared-types → shared-utils → shared-crud
   - **测试基础设施**: shared-test-util
-  - **业务模块层**: user-module → auth-module → file-module → geo-areas
+  - **业务模块层**: user-module → auth-module → file-module → delivery-address-module → advertisements-module → merchant-module → supplier-module → geo-areas
   - **应用层**: server (重构后)
 - **测试结构**:
   - **基础设施包**: 每个包独立的单元测试和集成测试