From ace4fa1c0a6122cc5ad4ba5db3ef2d328ac5de70 Mon Sep 17 00:00:00 2001 From: Masahiko AMANO Date: Thu, 3 Jul 2025 02:38:26 +0300 Subject: [PATCH] feat(backend/models): add pagination and slice --- backend/models/objects.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/backend/models/objects.go b/backend/models/objects.go index 74e8513..5fe5f85 100644 --- a/backend/models/objects.go +++ b/backend/models/objects.go @@ -57,3 +57,15 @@ type Session struct { ExpiresAt time.Time `json:"expires_at"` LastActivity time.Time `json:"last_activity"` } + +type Pagination struct { + Total int `json:"total"` + Offset int `json:"offset"` + Limit int `json:"limit"` + Count int `json:"count"` +} + +type Slice[T any] struct { + Pagination Pagination `json:"pagination"` + Data []T `json:"data"` +}