refactor: 调整项目目录结构,移除其他语言 API 目录

This commit is contained in:
RockYang
2023-07-10 09:42:11 +08:00
parent 2bb7ff3c13
commit d9e340ddc4
58 changed files with 0 additions and 15 deletions

22
api/store/vo/page.go Normal file
View File

@@ -0,0 +1,22 @@
package vo
import "math"
type Page struct {
Items interface{} `json:"items"`
Page int `json:"page"`
PageSize int `json:"page_size"`
Total int64 `json:"total"`
TotalPage int `json:"total_page"`
}
func NewPage(total int64, page int, pageSize int, items interface{}) Page {
totalPage := math.Ceil(float64(total) / float64(pageSize))
return Page{
Items: items,
Page: page,
PageSize: pageSize,
Total: total,
TotalPage: int(totalPage),
}
}