Rogee
13e721532d
feat: 检查路径参数是否包含模型字段并相应地导入字段包
2025-09-23 15:40:09 +08:00
Rogee
c7a753887d
feat: 允许解析生成文件,更新配置以支持 .gen.go 文件
2025-09-23 15:34:04 +08:00
Rogee
439456b6ad
fix: 恢复 gen route 的 model 参数渲染到 f2a8b98 实现
...
- 恢复 buildParamToken 函数的直接实现,移除复杂的 builder 模式
- 恢复 buildRenderData 函数的简单实现,提高代码可读性
- 恢复 Render 函数的基础实现,移除过度工程化的验证逻辑
- 修复路由分组路径问题:移除 buildResult 中错误的路径覆盖逻辑
- 当使用 model() 绑定时生成完整的数据库查询函数代码
此提交将 gen route 功能恢复到 commit f2a8b9876e
的实现方式,确保 model 参数渲染符合原始设计。
修复问题:
- 修复路由生成时 "open /v1/medias/routes.gen.go: no such file or directory" 错误
- 确保 model 参数正确生成完整的数据库查询代码而非简化接口
2025-09-22 19:01:40 +08:00
Rogee
4bd9f2f3eb
feat: 允许解析 services.gen.go 文件,增强生成文件的支持
2025-09-22 14:55:42 +08:00
Rogee
a8eb9e0025
fix: gen provider
2025-09-22 14:16:22 +08:00
Rogee
07e70a80ea
feat: 优化参数构建逻辑,简化模型接口,移除不必要的字段导入
2025-09-22 13:22:03 +08:00
Rogee
824861c27c
feat: Refactor AST generation routes workflow
...
- Introduced a comprehensive data model for route definitions, parameters, and validation rules.
- Established component interfaces for route parsing, comment parsing, import resolution, route building, validation, and rendering.
- Developed a detailed implementation plan outlining execution flow, user requirements, and compliance with design principles.
- Created a quickstart guide to assist users in utilizing the refactored system effectively.
- Conducted thorough research on existing architecture, identifying key improvements and establishing a refactoring strategy.
- Specified functional requirements and user scenarios to ensure clarity and testability.
- Generated a task list for implementation, emphasizing test-driven development and parallel execution where applicable.
2025-09-22 11:33:13 +08:00
Rogee
0cfc573960
feat: 增强 gRPC 支持,优化注册函数和导入处理逻辑
2025-09-22 10:00:25 +08:00
Rogee
1e98d0eaff
feat: add comment docs
2025-09-22 09:40:29 +08:00
Rogee
e1f83ae469
feat: 重构 pkg/ast/provider 模块,优化代码组织逻辑和功能实现
...
## 主要改进
### 架构重构
- 将单体 provider.go 拆分为多个专门的模块文件
- 实现了清晰的职责分离和模块化设计
- 遵循 SOLID 原则,提高代码可维护性
### 新增功能
- **验证规则系统**: 实现了完整的 provider 验证框架
- **报告生成器**: 支持多种格式的验证报告 (JSON/HTML/Markdown/Text)
- **解析器优化**: 重新设计了解析流程,提高性能和可扩展性
- **错误处理**: 增强了错误处理和诊断能力
### 修复关键 Bug
- 修复 @provider(job) 注解缺失 __job 注入参数的问题
- 统一了 job 和 cronjob 模式的处理逻辑
- 确保了 provider 生成的正确性和一致性
### 代码质量提升
- 添加了完整的测试套件
- 引入了 golangci-lint 代码质量检查
- 优化了代码格式和结构
- 增加了详细的文档和规范
### 文件结构优化
```
pkg/ast/provider/
├── types.go # 类型定义
├── parser.go # 解析器实现
├── validator.go # 验证规则
├── report_generator.go # 报告生成
├── renderer.go # 渲染器
├── comment_parser.go # 注解解析
├── modes.go # 模式定义
├── errors.go # 错误处理
└── validator_test.go # 测试文件
```
### 兼容性
- 保持向后兼容性
- 支持现有的所有 provider 模式
- 优化了 API 设计和用户体验
This completes the implementation of T025-T029 tasks following TDD principles,
including validation rules implementation and critical bug fixes.
2025-09-19 18:58:30 +08:00
Rogee
82c94d5a29
complete route generator
2025-09-11 22:43:52 +08:00
Rogee
f2a8b9876e
update route
2025-09-11 22:40:00 +08:00
Rogee
76c7592f26
feat: 添加对 @Bind 注释中 model 字段的支持,优化路径参数绑定逻辑并更新文档
2025-09-11 20:10:24 +08:00
Rogee
b93c7726f2
feat: 更新 @Bind 注释语法,移除 table 参数,优化文档内容
2025-09-11 19:28:51 +08:00
Rogee
9c910b6ede
refactor: 统一代码格式,优化代码可读性
2025-09-11 19:22:47 +08:00
Rogee
344798163b
feat: 重构路由渲染逻辑,添加构建渲染数据和模板渲染功能,优化代码结构
2025-09-11 19:14:44 +08:00
Rogee
c0d8f070e4
feat: 重构事件处理,添加默认通道和发布逻辑,移除不必要的提供者
2025-09-11 14:51:40 +08:00
Rogee
384b723f51
feat: update
2025-09-10 15:55:51 +08:00
Rogee
0d05d70fb1
feat: 更新模块路径为 v2,修正文档和代码中的相关引用
2025-09-10 14:54:16 +08:00
Rogee
3759295afa
feat: update tools
2025-05-28 19:39:32 +08:00
Rogee
099bdfc7d9
feat: update tools
2025-05-28 19:38:03 +08:00
Rogee
3b902509f7
feat: update
2025-05-27 09:47:24 +08:00
Rogee
ec1fa93033
feat: update
2025-05-26 12:17:52 +08:00
Rogee
2b0ee0e61c
feat: add table vars to model provider
2025-05-26 10:13:30 +08:00
Rogee
906858dbd6
feat: update
2025-05-23 23:42:18 +08:00
Rogee
b4cc2347e5
feat: update
2025-05-23 22:59:18 +08:00
yanghao05
1147ca4733
feat: update
2025-05-23 22:47:15 +08:00
yanghao05
cd7c13e49d
feat: update
2025-05-23 22:46:39 +08:00
yanghao05
e5000bcc73
feat: update
2025-05-23 22:45:36 +08:00
yanghao05
9ddea39084
feat: add table functions
2025-05-23 22:27:15 +08:00
yanghao05
e83332ea6a
feat: support softdelete in table functions
2025-05-23 22:24:53 +08:00
yanghao05
ab36ea0e5d
feat: update
2025-05-23 22:21:28 +08:00
yanghao05
c6b1a1664c
feat: update
2025-05-23 22:07:26 +08:00
yanghao05
f9a32a9ecb
feat: update
2025-05-23 22:06:22 +08:00
yanghao05
56ec95e43a
feat: update
2025-05-23 22:03:33 +08:00
yanghao05
3617c68a91
feat: update
2025-05-23 22:02:36 +08:00
yanghao05
8277c79d23
feat: add table funcs
2025-05-23 22:00:54 +08:00
yanghao05
fb5115a1d4
feat: update
2025-05-23 21:35:50 +08:00
yanghao05
3340ce3521
feat: update
2025-05-23 21:35:00 +08:00
yanghao05
6762bea530
feat: update
2025-05-23 19:50:54 +08:00
yanghao05
0758badc81
feat: update gen_model to support provider
2025-05-23 19:31:34 +08:00
rogeecn
34c05d52a2
fix: model
2025-03-22 19:27:42 +08:00
rogeecn
501af58e66
feat: add transformer for model
2025-03-22 18:23:26 +08:00
rogeecn
0015e2eee2
fix: issues
2025-03-21 19:25:58 +08:00
Rogee
aeae94a7d2
feat: update cronjob
2025-03-15 21:23:41 +08:00
rogeecn
b7fcf2c3e6
feat: update cronjob ast
2025-03-11 09:59:36 +08:00
rogeecn
de2ddef3af
fix: job
2025-03-11 09:56:22 +08:00
rogeecn
ad7f1b2c47
feat: add db
2025-02-28 10:26:54 +08:00
Rogee
e2b09420a0
feat: remove module command
2025-02-13 18:44:23 +08:00
Rogee
fcae9f2e3f
feat: update pkg name
2025-02-11 15:53:14 +08:00