feat(backend/models): add pagination and slice
This commit is contained in:
parent
d543101054
commit
ace4fa1c0a
@ -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"`
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user