From 94ee5b93ca187f10bb8c67a1670e9c79e06fbecb Mon Sep 17 00:00:00 2001 From: nikkiing <1031497516@qq.com> Date: Wed, 15 Mar 2023 17:29:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagination/{v1 => }/pagination.pb.go | 0 pagination/v1/pagination.go | 11 ++++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) rename pagination/{v1 => }/pagination.pb.go (100%) diff --git a/pagination/v1/pagination.pb.go b/pagination/pagination.pb.go similarity index 100% rename from pagination/v1/pagination.pb.go rename to pagination/pagination.pb.go diff --git a/pagination/v1/pagination.go b/pagination/v1/pagination.go index cc07208..af2636d 100644 --- a/pagination/v1/pagination.go +++ b/pagination/v1/pagination.go @@ -1,6 +1,8 @@ package pagination -import "math" +import ( + "math" +) const ( DefaultPage = 1 @@ -8,6 +10,13 @@ const ( MaxPageSize = 100 ) +type Pagination struct { + Page int32 `json:"page"` + PageSize int32 `json:"page_size"` + TotalPage int32 `json:"total_page"` + Total int32 `json:"total"` +} + type Integer interface { ~int | ~int32 }