feat(plop): 优化生成器支持 Prisma 关联关系

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
charilezhou
2026-01-19 17:30:18 +08:00
parent e5b3285519
commit 3119460f13
17 changed files with 488 additions and 116 deletions

11
pnpm-lock.yaml generated
View File

@@ -11,9 +11,15 @@ importers:
'@types/node':
specifier: ^22.10.2
version: 22.19.3
'@types/pluralize':
specifier: ^0.0.33
version: 0.0.33
plop:
specifier: ^4.0.4
version: 4.0.4(@types/node@22.19.3)
pluralize:
specifier: ^8.0.0
version: 8.0.0
prettier:
specifier: ^3.4.2
version: 3.7.4
@@ -2472,6 +2478,9 @@ packages:
'@types/picomatch@4.0.2':
resolution: {integrity: sha512-qHHxQ+P9PysNEGbALT8f8YOSHW0KJu6l2xU8DYY0fu/EmGxXdVnuTLvFUvBgPJMSqXq29SYHveejeAha+4AYgA==}
'@types/pluralize@0.0.33':
resolution: {integrity: sha512-JOqsl+ZoCpP4e8TDke9W79FDcSgPAR0l6pixx2JHkhnRjvShyYiAYw2LVsnA7K08Y6DeOnaU6ujmENO4os/cYg==}
'@types/qs@6.14.0':
resolution: {integrity: sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ==}
@@ -8784,6 +8793,8 @@ snapshots:
'@types/picomatch@4.0.2': {}
'@types/pluralize@0.0.33': {}
'@types/qs@6.14.0': {}
'@types/range-parser@1.2.7': {}