修改奖励配置新增过期类型和时间
This commit is contained in:
@ -2,6 +2,7 @@ package v1
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
type ListReq struct {
|
||||
@ -21,13 +22,17 @@ 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:"来源"`
|
||||
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:"领取后多少天过期"`
|
||||
}
|
||||
|
||||
type CreateRes struct {
|
||||
@ -36,12 +41,16 @@ type CreateRes struct {
|
||||
|
||||
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"`
|
||||
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:"领取后多少天过期"`
|
||||
}
|
||||
|
||||
type UpdateRes struct {
|
||||
|
||||
Reference in New Issue
Block a user