migrate from github
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
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"`
|
||||
}
|
||||
Reference in New Issue
Block a user