|
|
@@ -21,25 +21,33 @@ Draft
|
|
|
- [ ] 创建 `packages/core-module-mt/system-config-module-mt/` 目录
|
|
|
- [ ] 遵循现有模块结构模式
|
|
|
- [ ] 实现系统配置实体 (AC: 2)
|
|
|
- - [ ] 创建 `src/entities/system-config.entity.mt.ts`
|
|
|
- - [ ] 定义租户ID、配置键、配置值、描述等字段
|
|
|
- - [ ] 添加TypeORM装饰器
|
|
|
+ - [ ] 创建 `src/entities/system-config.entity.mt.ts` [参考: packages/core-module-mt/file-module-mt/src/entities/file.entity.ts]
|
|
|
+ - [ ] 定义租户ID、配置键、配置值、描述等字段 [参考: packages/core-module-mt/file-module-mt/src/entities/file.entity.ts:14-82]
|
|
|
+ - [ ] 添加TypeORM装饰器 [参考: packages/core-module-mt/file-module-mt/src/entities/file.entity.ts:6-82]
|
|
|
- [ ] 创建Schema定义 (AC: 3)
|
|
|
- - [ ] 创建 `src/schemas/system-config.schema.mt.ts`
|
|
|
- - [ ] 定义创建、更新、获取、列表Schema
|
|
|
- - [ ] 使用Zod OpenAPI扩展
|
|
|
+ - [ ] 创建 `src/schemas/system-config.schema.mt.ts` [参考: packages/core-module-mt/file-module-mt/src/schemas/file.schema.mt.ts]
|
|
|
+ - [ ] 定义创建、更新、获取、列表Schema [参考: packages/core-module-mt/file-module-mt/src/schemas/file.schema.mt.ts:85-177]
|
|
|
+ - [ ] 使用Zod OpenAPI扩展 [参考: packages/core-module-mt/file-module-mt/src/schemas/file.schema.mt.ts:1-177]
|
|
|
- [ ] 实现系统配置服务 (AC: 4)
|
|
|
- - [ ] 创建 `src/services/system-config.service.mt.ts`
|
|
|
- - [ ] 继承GenericCrudService抽象类
|
|
|
- - [ ] 配置租户隔离选项
|
|
|
- - [ ] 配置用户跟踪选项
|
|
|
+ - [ ] 创建 `src/services/system-config.service.mt.ts` [参考: packages/core-module-mt/file-module-mt/src/services/file.service.mt.ts]
|
|
|
+ - [ ] 继承GenericCrudService抽象类 [参考: packages/core-module-mt/file-module-mt/src/services/file.service.mt.ts:8-14]
|
|
|
+ - [ ] 配置租户隔离选项 [参考: packages/shared-crud/src/services/generic-crud.service.ts:553-566]
|
|
|
+ - [ ] 配置用户跟踪选项 [参考: packages/shared-crud/src/services/generic-crud.service.ts:507-511]
|
|
|
- [ ] 生成CRUD路由 (AC: 5)
|
|
|
- - [ ] 创建 `src/routes/system-config.routes.mt.ts`
|
|
|
- - [ ] 使用createCrudRoutes生成完整路由
|
|
|
- - [ ] 配置租户选项
|
|
|
+ - [ ] 创建 `src/routes/system-config.routes.mt.ts` [参考: packages/core-module-mt/file-module-mt/src/routes/index.mt.ts]
|
|
|
+ - [ ] 使用createCrudRoutes生成完整路由 [参考: packages/core-module-mt/file-module-mt/src/routes/index.mt.ts:15-29]
|
|
|
+ - [ ] 配置租户选项 [参考: packages/core-module-mt/file-module-mt/src/routes/index.mt.ts:24-28]
|
|
|
- [ ] 创建模块导出 (AC: 1)
|
|
|
- [ ] 创建 `src/index.mt.ts` 导出实体、服务、路由
|
|
|
- [ ] 配置模块入口
|
|
|
+
|
|
|
+- [ ] 实现系统配置测试 (AC: 6)
|
|
|
+ - [ ] 创建系统配置路由集成测试 [参考: packages/core-module-mt/file-module-mt/tests/integration/file.routes.integration.test.ts]
|
|
|
+ - [ ] 创建 `tests/integration/system-config.routes.integration.test.ts` [参考: packages/core-module-mt/file-module-mt/tests/integration/file.routes.integration.test.ts]
|
|
|
+ - [ ] 实现CRUD操作测试 [参考: packages/core-module-mt/file-module-mt/tests/integration/file.routes.integration.test.ts:79-264]
|
|
|
+ - [ ] 实现多租户隔离测试 [参考: packages/core-module-mt/file-module-mt/tests/integration/file.routes.integration.test.ts:587-875]
|
|
|
+ - [ ] 实现认证授权测试 [参考: packages/core-module-mt/file-module-mt/tests/integration/file.routes.integration.test.ts:535-585]
|
|
|
+ - [ ] 实现数据验证测试 [参考: packages/core-module-mt/file-module-mt/tests/integration/file.routes.integration.test.ts:171-189]
|
|
|
- [ ] 验证现有功能 (AC: 6)
|
|
|
- [ ] 运行现有测试确保无回归
|
|
|
- [ ] 验证共享CRUD包集成正常
|