feat(架构): 完善基础架构设计

This commit is contained in:
2025-07-02 16:17:59 +08:00
parent 03e615a8fd
commit 5b4392894f
89 changed files with 18555 additions and 3521 deletions

View File

@@ -76,9 +76,14 @@ type ResponseBuilder interface {
NotFound(c *gin.Context, message ...string)
Conflict(c *gin.Context, message string)
InternalError(c *gin.Context, message ...string)
ValidationError(c *gin.Context, errors interface{})
TooManyRequests(c *gin.Context, message ...string)
// 分页响应
Paginated(c *gin.Context, data interface{}, pagination PaginationMeta)
// 自定义响应
CustomResponse(c *gin.Context, statusCode int, data interface{})
}
// RequestValidator 请求验证器接口
@@ -90,6 +95,9 @@ type RequestValidator interface {
// 绑定和验证
BindAndValidate(c *gin.Context, dto interface{}) error
// 直接验证结构体
ValidateStruct(dto interface{}) error
}
// PaginationMeta 分页元数据