调整奖励接口
This commit is contained in:
@ -21,36 +21,51 @@ type ListRes struct {
|
||||
}
|
||||
|
||||
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:"来源"`
|
||||
ExpireType int `json:"expireType" v:"required#过期类型只能为1或2" dc:"过期类型"`
|
||||
ValidFrom *gtime.Time `json:"validFrom" dc:"有效开始时间(expire_type=1 时使用)"`
|
||||
ValidTo *gtime.Time `json:"validTo" dc:"有效结束时间(expire_type=1 时使用)"`
|
||||
ExpireDays int `json:"expireDays" dc:"领取后多少天过期"`
|
||||
g.Meta `path:"/reward" method:"post" tags:"Reward" summary:"(系统、商户、门店后台)创建奖励"`
|
||||
StoreId int64 `json:"storeId" dc:"门店ID"`
|
||||
Name string `json:"name" v:"required#名称不能为空" dc:"名称"`
|
||||
RewardTypeId int64 `json:"rewardTypeId" v:"required#奖励类型ID不能为空" dc:"奖励类型ID"`
|
||||
GameId int64 `json:"gameId" v:"required#游戏ID不能为空" dc:"游戏ID"`
|
||||
RewardImg string `json:"rewardImg" dc:"奖励图片"`
|
||||
QQGoodsId string `json:"qqGoodsId" v:"required#不能为空" dc:"QQ网吧物品ID"`
|
||||
QQGoodsIdStr string `json:"qqGoodsIdStr" v:"required#不能为空" dc:"QQ网吧物品ID字符串"`
|
||||
Status int `json:"status" dc:"状态" d:"1:启用 2:禁用"`
|
||||
ExpireType int `json:"expireType" v:"required#过期类型只能为1或2" dc:"过期类型"`
|
||||
ValidFrom *gtime.Time `json:"validFrom" dc:"有效开始时间(expire_type=1 时使用)"`
|
||||
ValidTo *gtime.Time `json:"validTo" dc:"有效结束时间(expire_type=1 时使用)"`
|
||||
ExpireDays int `json:"expireDays" dc:"领取后多少天过期"`
|
||||
DailyTotalLimit int `json:"dailyTotalLimit" v:"required#每日领取总次数限制" dc:"每日领取总次数限制"`
|
||||
TotalLimit int `json:"totalLimit" v:"required#奖励总限不能为空" dc:"领取总次数限制"`
|
||||
UserDailyLimit int `json:"userDailyLimit" v:"required#用户每日领取总次数限制" dc:"用户每日领取总次数限制"`
|
||||
UserTotalLimit int `json:"userTotalLimit" v:"required#用户领取总次数限制" dc:"用户领取总次数限制"`
|
||||
GrantQuantify int `json:"grantQuantify" v:"required#发放数量不能为空" dc:"发放数量"`
|
||||
Source int `json:"source" v:"required#来源不能为空" dc:"来源" d:"1"`
|
||||
}
|
||||
|
||||
type CreateRes struct {
|
||||
Id int64 `json:"id" dc:"奖励ID"`
|
||||
Success bool `json:"success" dc:"是否成功"`
|
||||
}
|
||||
|
||||
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"`
|
||||
ExpireType int `json:"expireType" dc:"过期类型" d:"1"`
|
||||
ValidFrom *gtime.Time `json:"validFrom" dc:"有效开始时间(expire_type=1 时使用)"`
|
||||
ValidTo *gtime.Time `json:"validTo" dc:"有效结束时间(expire_type=1 时使用)"`
|
||||
ExpireDays int `json:"expireDays" dc:"领取后多少天过期"`
|
||||
g.Meta `path:"/reward" method:"put" tags:"Reward" summary:"(系统、商户、门店后台)更新奖励"`
|
||||
Id int64 `json:"id" v:"required#id不能为空" dc:"ID"`
|
||||
Name string `json:"name" dc:"名称"`
|
||||
RewardType int `json:"rewardType" dc:"奖励类型"`
|
||||
GameId int64 `json:"gameId" dc:"游戏id"`
|
||||
Img string `json:"img" dc:"图片"`
|
||||
QQGoodsId string `json:"qqGoodsId" dc:"qq商品id"`
|
||||
QQGoodsIdStr string `json:"qqGoodsIdStr" dc:"qq商品id"`
|
||||
Status int `json:"status" dc:"状态" d:"1"`
|
||||
ExpireType int `json:"expireType" dc:"过期类型" d:"1"`
|
||||
ValidFrom *gtime.Time `json:"validFrom" dc:"有效开始时间(expire_type=1 时使用)"`
|
||||
ValidTo *gtime.Time `json:"validTo" dc:"有效结束时间(expire_type=1 时使用)"`
|
||||
ExpireDays int `json:"expireDays" dc:"领取后多少天过期"`
|
||||
DailyTotalLimit int `json:"dailyTotalLimit" dc:"每日领取总次数限制"`
|
||||
TotalLimit int `json:"totalLimit" dc:"领取总次数限制"`
|
||||
UserDailyLimit int `json:"userDailyLimit" dc:"用户每日领取总次数限制"`
|
||||
UserTotalLimit int `json:"userTotalLimit" dc:"用户领取总次数限制"`
|
||||
GrantQuantify int `json:"grantQuantify" dc:"发放数量"`
|
||||
Source int `json:"source" v:"required#来源不能为空" dc:"来源" d:"1"`
|
||||
}
|
||||
|
||||
type UpdateRes struct {
|
||||
@ -60,6 +75,7 @@ type UpdateRes struct {
|
||||
type DeleteReq struct {
|
||||
g.Meta `path:"/reward/{id}" method:"delete" tags:"Reward" summary:"(系统、商户、门店后台)删除奖励"`
|
||||
Id int64 `in:"path" json:"id" v:"required#ID不能为空" dc:"ID"`
|
||||
Source int `json:"source" v:"required#来源不能为空" dc:"来源" d:"1"`
|
||||
}
|
||||
|
||||
type DeleteRes struct {
|
||||
|
||||
Reference in New Issue
Block a user