25 lines
421 B
Go
25 lines
421 B
Go
package entities
|
|
|
|
type IdRequest struct {
|
|
Id int64 `json:"id" form:"id" valid:"Required"`
|
|
}
|
|
|
|
type PageRequest struct {
|
|
Page int `json:"page" form:"page"`
|
|
PageSize int `json:"page_size" form:"page_size"`
|
|
}
|
|
|
|
func (p *PageRequest) SetDefault() {
|
|
if p.Page == 0 {
|
|
p.Page = 1
|
|
}
|
|
if p.PageSize == 0 {
|
|
p.PageSize = 10
|
|
}
|
|
}
|
|
|
|
type PageRsp struct {
|
|
Total int64 `json:"total"`
|
|
Data interface{} `json:"data"`
|
|
}
|