提交 8a7e23c9 authored 作者: mooncake's avatar mooncake

change tag

上级 23a51b39
...@@ -71,10 +71,10 @@ type IPagination interface { ...@@ -71,10 +71,10 @@ type IPagination interface {
} }
type Pagination struct { type Pagination struct {
PageIndex int `json:"pageIndex" form:"pageIndex" binding:"" example:"1"` // 1-based PageIndex int `json:"pageIndex" form:"pageIndex" binding:"" example:"1"` // 1-based
PageSize int `json:"pageSize" form:"pageSize" binding:"" example:"10"` // 1-based PageSize int `json:"pageSize" form:"pageSize" binding:"" example:"10"` // 1-based
Sort string `json:"sort,omitempty" form:"sort" binding:"" example:"-id" query:"type:order"` //排序字段,负号表示降序,多个字段排序中间用,(英文逗号)分隔 Sort string `json:"sort,omitempty" form:"sort" binding:"" example:"-id" gq:"type:order"` //排序字段,负号表示降序,多个字段排序中间用,(英文逗号)分隔
Unscope bool `json:"-" form:"-" query:"-"` Unscope bool `json:"-" form:"-" gq:"-"`
} }
func (x Pagination) Unscoped() bool { func (x Pagination) Unscoped() bool {
...@@ -82,8 +82,8 @@ func (x Pagination) Unscoped() bool { ...@@ -82,8 +82,8 @@ func (x Pagination) Unscoped() bool {
} }
type CreatedAtPeriod struct { type CreatedAtPeriod struct {
CreatedAtBegin xtime.DateTime `json:"createdAtBegin" form:"createdAtBegin" gorm:"column:created_at;type:datetime;comment:创建时间" query:"type:gte;column:created_at" example:"2025-01-01 12:20:26"` //开始日期起始 (>=) CreatedAtBegin xtime.DateTime `json:"createdAtBegin" form:"createdAtBegin" gorm:"column:created_at;type:datetime;comment:创建时间" gq:"type:gte;column:created_at" example:"2025-01-01 12:20:26"` //开始日期起始 (>=)
CreatedAtEnd xtime.DateTime `json:"createdAtEnd" form:"createdAtEnd" gorm:"column:created_at;type:datetime;comment:创建时间" query:"type:lt;column:created_at" example:"2025-02-01 12:20:26"` //结束日期截止 (<) CreatedAtEnd xtime.DateTime `json:"createdAtEnd" form:"createdAtEnd" gorm:"column:created_at;type:datetime;comment:创建时间" gq:"type:lt;column:created_at" example:"2025-02-01 12:20:26"` //结束日期截止 (<)
} }
func (x Pagination) GetOffset() int { func (x Pagination) GetOffset() int {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论