Jelajahi Sumber

📝 docs(prd): 完善史诗004模块结构描述

- 完善后端模块结构:添加types目录、配置文件、测试目录
- 完善UI模块结构:添加api、hooks、types目录及配置文件
- 修正用户故事标题:统一使用"信用额度"术语
- 使模块结构描述符合实际项目标准

🤖 Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
yourname 1 bulan lalu
induk
melakukan
8db0d8082c
1 mengubah file dengan 28 tambahan dan 7 penghapusan
  1. 28 7
      docs/prd/epic-004-credit-payment.md

+ 28 - 7
docs/prd/epic-004-credit-payment.md

@@ -42,7 +42,7 @@
 4. 额度提现功能
 
 ## 用户故事
-### 故事1:创建多租户余额模块
+### 故事1:创建多租户信用额度模块
 **作为** 系统管理员
 **我希望** 能够管理用户的信用额度
 **以便** 控制用户的支付权限和风险
@@ -55,7 +55,7 @@
 - [ ] 添加数据库迁移脚本
 - [ ] 编写单元测试覆盖核心逻辑
 
-### 故事2:创建多租户余额管理UI模块
+### 故事2:创建多租户信用额度管理UI模块
 **作为** 后台管理员
 **我希望** 有一个界面来管理用户信用额度
 **以便** 方便地设置和调整用户额度
@@ -133,18 +133,39 @@ packages/
 │   │   ├── entities/                  # 实体定义
 │   │   │   ├── credit-balance.mt.entity.ts
 │   │   │   └── credit-balance-log.mt.entity.ts
+│   │   │   └── index.ts
 │   │   ├── services/                  # 服务层
-│   │   │   └── credit-balance.service.ts
+│   │   │   ├── credit-balance.service.ts
+│   │   │   └── index.ts
 │   │   ├── schemas/                   # 数据验证
+│   │   │   └── index.ts
 │   │   ├── routes/                    # API路由
-│   │   └── index.ts
+│   │   │   └── index.ts
+│   │   ├── types/                     # 类型定义
+│   │   │   └── index.ts
+│   │   └── index.ts                   # 主入口文件
+│   ├── tests/                         # 测试文件
+│   ├── tsconfig.json                  # TypeScript配置
+│   ├── vitest.config.ts               # 测试配置
 │   └── package.json
 └── @d8d/credit-balance-management-ui-mt/   # 余额管理UI模块
     ├── src/
+    │   ├── api/                       # API客户端
+    │   │   ├── index.ts
+    │   │   └── creditBalanceClient.ts
     │   ├── components/                # 组件
-    │   ├── pages/                     # 页面
-    │   │   └── CreditBalanceManagement.tsx
-    │   └── index.tsx
+    │   │   ├── CreditBalanceManagement.tsx
+    │   │   └── index.ts
+    │   ├── hooks/                     # React hooks
+    │   │   └── index.ts
+    │   ├── types/                     # 类型定义
+    │   │   ├── index.ts
+    │   │   └── creditBalance.ts
+    │   └── index.ts                   # 主入口文件
+    ├── tests/                         # 测试文件
+    ├── eslint.config.js               # ESLint配置
+    ├── tsconfig.json                  # TypeScript配置
+    ├── vitest.config.ts               # 测试配置
     └── package.json
 ```