From bb6423a6cec217a0f97e0481a0edea510c0bcaf8 Mon Sep 17 00:00:00 2001 From: afumu <50908453+afumu@users.noreply.github.com> Date: Sat, 19 Aug 2023 16:06:57 +0800 Subject: [PATCH] refactor: Change the page json serialization to small camel #65 (#66) --- gplus/dao.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gplus/dao.go b/gplus/dao.go index e7081e3..986459a 100644 --- a/gplus/dao.go +++ b/gplus/dao.go @@ -34,11 +34,11 @@ func Init(db *gorm.DB) { } type Page[T any] struct { - Current int - Size int - Total int64 - Records []*T - RecordsMap []T + Current int `json:"current"` + Size int `json:"size"` + Total int64 `json:"total"` + Records []*T `json:"records"` + RecordsMap []T `json:"recordsMap"` } type Dao[T any] struct{}