23 lines
488 B
Go
23 lines
488 B
Go
|
|
package pagination
|
||
|
|
|
||
|
|
type QueryParams struct {
|
||
|
|
Query string
|
||
|
|
Page int
|
||
|
|
Limit int
|
||
|
|
}
|
||
|
|
|
||
|
|
type Response struct {
|
||
|
|
Pagination Pagination `json:"pagination"`
|
||
|
|
Data any `json:"data"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type Pagination struct {
|
||
|
|
Page int `json:"page"`
|
||
|
|
PerPage int `json:"per_page"`
|
||
|
|
Total int `json:"total"`
|
||
|
|
TotalPages int `json:"total_pages"`
|
||
|
|
HasNext bool `json:"has_next"`
|
||
|
|
HasPrev bool `json:"has_prev"`
|
||
|
|
OverallCount int `json:"overall_count,omitempty"`
|
||
|
|
}
|