|
@@ -3,28 +3,27 @@ package v1
|
|
|
import (
|
|
|
"demo/internal/model/entity"
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
|
- "github.com/gogf/gf/v2/os/gtime"
|
|
|
)
|
|
|
|
|
|
type CreateReq struct {
|
|
|
- g.Meta `path:"/lottery_prize_info" method:"post" tags:"lottery_prize_info" summary:"Create lottery_prize_info"`
|
|
|
- Id int `v:"required" dc:" lottery_prize_info id"`
|
|
|
- ActiveId int `v:"required" dc:" ActiveId"` // 关联活动id
|
|
|
- State int // 默认0:可用;1:已取消或失效
|
|
|
- Mold int // 奖品类型:0:会员福利;1:参与奖
|
|
|
- PbId int // 奖品属性:默认0:剑鱼;1:WPS会员月卡;2:腾讯视频会员周卡;3:网易云音乐黑胶VIP月卡;4:喜马拉雅会员2个月 5:腾讯视频会员年卡 6:网易云音乐黑胶vip周卡 7:WPS会员年卡
|
|
|
- JyPrize string // 剑鱼奖品内容
|
|
|
- Frequency string // 中奖频次:每人X天“会员福利”仅可中奖:X次(每人7天“会员福利”仅可中奖1次)
|
|
|
- Probability int // 中奖概率
|
|
|
- Inventory int // 库存
|
|
|
- Total int // 奖品总量
|
|
|
- AlarmSwitch int // 告警开关0:打开;1:关闭
|
|
|
- AlarmThreshold int // 奖品告警阈值
|
|
|
- Target string // 中奖目标用户。默认空:全部用户,f:免费用户;v:超级订阅用户;m:大会员用户;e:商机管理用户
|
|
|
- DailyNum int // 每日中此奖限制数量
|
|
|
+ g.Meta `path:"/lottery_prize_info" method:"post" tags:"lottery_prize_info" summary:"Create lottery_prize_info"`
|
|
|
+ ActiveId int `v:"required" dc:" ActiveId 关联活动id"`
|
|
|
+ LpiList []struct {
|
|
|
+ State int `v:"required|in:0,1" dc:" 奖品状态默认0:有效;1:已取消"`
|
|
|
+ Mold int `v:"required|in:0,1" dc:" 奖品类型 0:会员福利;1:参与奖"`
|
|
|
+ PbId int `v:"required" dc:"奖品属性"`
|
|
|
+ Frequency string ` dc:"奖品属性 中奖频次:每人X天“会员福利”仅可中奖:Y次 Y-X" `
|
|
|
+ Probability int `v:"required|min:0" dc:"中奖概率 大于0,各奖品中奖概率加起来等于1000 "`
|
|
|
+ Total int `v:"required|min:0" dc:"奖品总数"`
|
|
|
+ AlarmSwitch int `v:"required|in:0,1" dc:" 告警开关 0:开启;1:关闭"`
|
|
|
+ AlarmThreshold int `v:"required-if:AlarmSwitch,0" dc:" 告警阈值" `
|
|
|
+ Target string `dc:"中奖目标用户"`
|
|
|
+ DailyNum int `dc:"每日中此奖限制数量"`
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
type CreateRes struct {
|
|
|
- Id int64 `json:"id" dc:"user id"`
|
|
|
+ State int `json:"state" `
|
|
|
}
|
|
|
type Status int
|
|
|
|
|
@@ -33,32 +32,39 @@ const (
|
|
|
StatusDisabled Status = 1 // User is disabled.
|
|
|
)
|
|
|
|
|
|
+type DelReq struct {
|
|
|
+ g.Meta `path:"/lottery_prize_info/{id}" method:"put" tags:"lottery_prize_info" summary:"Update lottery_prize_info"`
|
|
|
+ Id *int64 ` v:"required" dc:"lottery_prize_info id"`
|
|
|
+}
|
|
|
+type DelRes struct {
|
|
|
+ State int `json:"state" `
|
|
|
+}
|
|
|
type UpdateReq struct {
|
|
|
- g.Meta `path:"/lottery_prize_info/{id}" method:"put" tags:"lottery_prize_info" summary:"Update lottery_prize_info"`
|
|
|
- Id int64 ` v:"required" dc:"lottery_prize_info id"`
|
|
|
- StartTime *gtime.Time ` dc:" startTime"`
|
|
|
- EndTime *gtime.Time ` dc:" endTime"`
|
|
|
- LotteryStartTime string ` dc:" lotteryStartTime"`
|
|
|
- LotteryEndTime string ` dc:" lotteryEndTime"`
|
|
|
- Cost int ` dc:" cost"`
|
|
|
- DailyNum int ` dc:" dailyNum"`
|
|
|
- DeviceNum int ` dc:" deviceNum"`
|
|
|
- IpNum int ` dc:" ipNum"`
|
|
|
- Pic string ` dc:" pic"`
|
|
|
- Rule string ` dc:" rule"`
|
|
|
- ShareCopy string ` dc:" shareCopy"`
|
|
|
- State int ` dc:" state"`
|
|
|
+ g.Meta `path:"/lottery_prize_info/{id}" method:"put" tags:"lottery_prize_info" summary:"Update lottery_prize_info"`
|
|
|
+ Id *int64 ` v:"required" dc:"lottery_prize_info id"`
|
|
|
+ State *int `v:"in:0,1" dc:" 奖品状态默认0:有效;1:已取消"`
|
|
|
+ Mold *int `v:"in:0,1" dc:" 奖品类型 0:会员福利;1:参与奖"`
|
|
|
+ PbId int ` dc:"奖品属性"`
|
|
|
+ Frequency string ` dc:"奖品属性 中奖频次:每人X天“会员福利”仅可中奖:Y次 Y-X" `
|
|
|
+ Probability *int `v:"min:0" dc:"中奖概率 大于0,各奖品中奖概率加起来等于1000 "`
|
|
|
+ Total *int `v:"min:0" dc:"奖品总数"`
|
|
|
+ AlarmSwitch *int `v:"in:0,1" dc:" 告警开关 0:开启;1:关闭"`
|
|
|
+ AlarmThreshold *int `dc:" 告警阈值" `
|
|
|
+ Target string `dc:"中奖目标用户"`
|
|
|
+ DailyNum *int `dc:"每日中此奖限制数量"`
|
|
|
}
|
|
|
type UpdateRes struct{}
|
|
|
type GetListReq struct {
|
|
|
- g.Meta `path:"/lottery_prize_info" method:"get" tags:"lottery_prize_info" summary:"Get lottery_prize_info"`
|
|
|
- StartTime *gtime.Time ` dc:" startTime"`
|
|
|
- EndTime *gtime.Time ` dc:" endTime"`
|
|
|
- State int ` dc:" state"`
|
|
|
- Mold int ` dc:" mold"`
|
|
|
- Name string
|
|
|
- Id int
|
|
|
+ g.Meta `path:"/lottery_prize_info" method:"get" tags:"lottery_prize_info" summary:"Get lottery_prize_info"`
|
|
|
+ ActiveId int `v:"required" dc:" ActiveId 关联活动id"`
|
|
|
+ State int `v:"in:0,1" dc:" 奖品状态默认0:有效;1:已取消"`
|
|
|
+ Mold int `v:"in:0,1" dc:" 奖品类型 0:会员福利;1:参与奖"`
|
|
|
+ Name string `dc:"奖品名称"`
|
|
|
+ Id int `dc:"奖品id"`
|
|
|
+ Offset int `d:"0" dc:"分页开始条数"`
|
|
|
+ Limit int `d:"10" dc:"每页条数"`
|
|
|
}
|
|
|
type GetListRes struct {
|
|
|
- List []*entity.LotteryPrizeInfo `json:"list" dc:"lottery_prize_info list"`
|
|
|
+ List []*entity.LotteryPrizeInfo `json:"list" dc:"lottery_prize_info list"`
|
|
|
+ Total int `json:"total" dc:"lottery_prize_info list total"`
|
|
|
}
|