Files
mayfly-go/server/pkg/model/page.go

19 lines
336 B
Go
Raw Normal View History

2021-01-08 15:37:32 +08:00
package model
2020-09-01 10:34:11 +08:00
// 分页参数
type PageParam struct {
PageNum int `json:"pageNum"`
PageSize int `json:"pageSize"`
}
// 分页结果
type PageResult struct {
2022-11-18 17:52:30 +08:00
Total int64 `json:"total"`
List any `json:"list"`
2020-09-01 10:34:11 +08:00
}
2022-10-26 20:49:29 +08:00
// 空分页结果日志
func EmptyPageResult() *PageResult {
2022-11-18 17:52:30 +08:00
return &PageResult{Total: 0, List: make([]any, 0)}
2022-10-26 20:49:29 +08:00
}