64 lines
2.5 KiB
Go
64 lines
2.5 KiB
Go
package v1
|
|
|
|
import "github.com/gogf/gf/v2/frame/g"
|
|
|
|
type ListReq struct {
|
|
g.Meta `path:"/reward" method:"get" tags:"Reward" summary:"(系统、商户、门店后台)获取奖励列表"`
|
|
Name string `json:"name" dc:"名称"`
|
|
Page int `json:"page" dc:"页数"`
|
|
Size int `json:"size" dc:"每页数量"`
|
|
Status int `json:"status" dc:"状态"`
|
|
StoreId int64 `json:"storeId" dc:"门店ID"`
|
|
RewardTypeId int64 `json:"rewardTypeId" dc:"奖励类型ID"`
|
|
}
|
|
|
|
type ListRes struct {
|
|
List interface{} `json:"list" dc:"奖励列表"`
|
|
Total int `json:"total" dc:"总数"`
|
|
}
|
|
|
|
type CreateReq struct {
|
|
g.Meta `path:"/reward" method:"post" tags:"Reward" summary:"(系统、商户、门店后台)创建奖励"`
|
|
Name string `json:"name" v:"required#名称不能为空" dc:"名称"`
|
|
Description string `json:"description" v:"required#描述不能为空" dc:"描述"`
|
|
Value int64 `json:"value" v:"required#数值不能为空" dc:"奖励值"`
|
|
Status int `json:"status" dc:"状态" d:"1"`
|
|
StoreId int64 `json:"storeId" dc:"门店ID"`
|
|
RewardTypeId int64 `json:"rewardTypeId" v:"required#奖励类型ID不能为空" dc:"奖励类型ID"`
|
|
Source int `json:"source" v:"in:1,2#来源只能为1或2" dc:"来源"`
|
|
}
|
|
|
|
type CreateRes struct {
|
|
Id int64 `json:"id" dc:"奖励ID"`
|
|
}
|
|
|
|
type UpdateReq struct {
|
|
g.Meta `path:"/reward" method:"put" tags:"Reward" summary:"(系统、商户、门店后台)更新奖励"`
|
|
Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"`
|
|
Name string `json:"name" v:"required#名称不能为空" dc:"名称"`
|
|
Description string `json:"description" v:"required#描述不能为空" dc:"描述"`
|
|
Value int64 `json:"value" v:"required#数值不能为空" dc:"奖励值"`
|
|
Status int `json:"status" dc:"状态" d:"1"`
|
|
StoreId int64 `json:"storeId" dc:"门店ID"`
|
|
}
|
|
|
|
type UpdateRes struct {
|
|
Success bool `json:"success" dc:"是否成功"`
|
|
}
|
|
|
|
type DeleteReq struct {
|
|
g.Meta `path:"/reward/{id}" method:"delete" tags:"Reward" summary:"(系统、商户、门店后台)删除奖励"`
|
|
Id int64 `in:"path" json:"id" v:"required#ID不能为空" dc:"ID"`
|
|
}
|
|
|
|
type DeleteRes struct {
|
|
Success bool `json:"success" dc:"是否成功"`
|
|
}
|
|
|
|
type CallbackReq struct {
|
|
g.Meta `path:"/reward/callback" method:"post" tags:"Reward" summary:"(tencent)回调"`
|
|
UserId int64 `json:"userId" v:"required#用户ID不能为空" dc:"用户ID"`
|
|
}
|
|
type CallbackRes struct {
|
|
}
|