chore: initial commit

This commit is contained in:
2026-07-22 17:50:33 +08:00
parent 82936a8987
commit ee9f50b859
107 changed files with 8346 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
package common
type Pagination struct {
Page int32 `form:"page,default=1" validate:"gte=1"`
PageSize int32 `form:"page_size,default=10" validate:"gte=1,lte=100"`
}

View File

@@ -0,0 +1,16 @@
package common
// Response 通用响应结构体
type Response struct {
Message string `json:"msg,omitempty"` // 消息说明
Data interface{} `json:"data,omitempty"` // 业务数据
}
// PageResponse 分页查询通用相应结构体
type PageResponse struct {
Message string `json:"msg,omitempty"` // 消息说明
Page int32 `json:"page"` // 当前页码
PageSize int32 `json:"page_size"` // 每页数量
List interface{} `json:"list,omitempty"` // 业务数据
Total int64 `json:"total"` // 总记录数
}