Files
2026-07-15 22:42:31 +08:00

28 lines
487 B
Go

package dto
type Pagination struct {
Page int `json:"page"`
PageSize int `json:"page_size"`
}
func (p *Pagination) Validate() bool {
if p == nil {
return false
}
if p.Page <= 0 || p.PageSize <= 0 {
return false
}
return true
}
type SortArgs struct {
Field string `json:"field"`
Desc bool `json:"desc"`
}
type RecursiveOptions struct {
IncludeChildren bool `json:"include_children"`
Recursive bool `json:"recursive"`
Depth *int `json:"depth"`
}