Commit Graph

3 Commits

Author SHA1 Message Date
charilezhou
3119460f13 feat(plop): 优化生成器支持 Prisma 关联关系
- 支持一对多/多对一关系定义并生成到 Prisma schema
- 简化流程:查询关联配置根据关系自动预填
- 修复 Handlebars 模板 HTML 转义导致的乱码问题
- 修复 controller 模板缺少 Prisma 导入的问题
- 新增页面模板 (page.hbs) 生成前端页面
- 添加 FindAllParams/PaginationQueryDto 索引签名修复类型兼容

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 17:30:18 +08:00
charilezhou
f492e7c172 feat(plop): 模板支持关联关系和多对多生成
- service.hbs: 支持三种服务类型,生成 @CrudOptions 关联配置和 DTO 转换方法
- dto.hbs: 生成 BriefDto、DetailResponseDto、AssignDto
- controller.hbs: 支持关联查询端点和多对多分配端点
- types.hbs: 添加关联类型接口定义

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 16:03:12 +08:00
charilezhou
473c2c1510 feat: 添加 plop 代码生成器模板
添加组件和模块的代码生成器模板,提高开发效率。

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 14:08:56 +08:00