forked from mirrors/homebox
refactor: remove empty services (#116)
* remove empty services * remove old factory * remove old static files * cleanup more duplicate service code * file/folder reorg
This commit is contained in:
parent
6529549289
commit
cd82fe0d89
179 changed files with 514 additions and 582 deletions
12
backend/internal/data/repo/pagination.go
Normal file
12
backend/internal/data/repo/pagination.go
Normal file
|
@ -0,0 +1,12 @@
|
|||
package repo
|
||||
|
||||
type PaginationResult[T any] struct {
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"pageSize"`
|
||||
Total int `json:"total"`
|
||||
Items []T `json:"items"`
|
||||
}
|
||||
|
||||
func calculateOffset(page, pageSize int) int {
|
||||
return (page - 1) * pageSize
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue