64 lines
3.4 KiB
Go
64 lines
3.4 KiB
Go
package exchcodemod
|
|
|
|
import (
|
|
"time"
|
|
|
|
"91porn-server/models/commod"
|
|
)
|
|
|
|
type ListReqParam struct {
|
|
BatchNum *string `form:"batchNum" json:"batchNum"`
|
|
Channel *string `form:"channel" json:"channel"`
|
|
Code *string `form:"code" json:"code"`
|
|
App *AppType `form:"app" json:"app"`
|
|
Authority *AuthorityType `form:"authority" json:"authority"`
|
|
Status *ExchangeStatus `form:"status" json:"status"`
|
|
Page commod.Page
|
|
Role *string `form:"role" json:"role"`
|
|
}
|
|
|
|
type AddReqParam struct {
|
|
App AppType `form:"app" json:"app" binding:"required"`
|
|
Channels []string `form:"channels" json:"channels"`
|
|
Authority AuthorityType `form:"authority" json:"authority" binding:"required"`
|
|
Reward int `form:"reward" json:"reward" binding:"required"`
|
|
RewardCount int `form:"rewardCount" json:"rewardCount"`
|
|
Count int64 `form:"count" json:"count" binding:"required"`
|
|
EffectiveAt time.Time `form:"effectiveAt" json:"effectiveAt" binding:"required"`
|
|
InvalidAt time.Time `form:"invalidAt" json:"invalidAt" binding:"required"`
|
|
Remark string `form:"remark" json:"remark"`
|
|
UsableNum int `form:"usableNum,omitempty" bson:"usableNum,omitempty" binding:"required"` //可用次数
|
|
}
|
|
|
|
type UpdateReqParam struct {
|
|
ID ObjectID `form:"id" json:"id" binding:"required"`
|
|
Status *ExchangeStatus `form:"status" json:"status"`
|
|
Channel *string `form:"channel" json:"channel"`
|
|
Authority *AuthorityType `form:"authority" json:"authority"`
|
|
Reward *int `form:"reward" json:"reward"`
|
|
RewardCount *int `form:"rewardCount" json:"rewardCount"`
|
|
EffectiveAt *time.Time `form:"effectiveAt" json:"effectiveAt"`
|
|
InvalidAt *time.Time `form:"invalidAt" json:"invalidAt"`
|
|
Remark *string `form:"remark" json:"remark"`
|
|
UsableNum *int `form:"usableNum,omitempty" bson:"usableNum,omitempty"` //可用次数
|
|
}
|
|
|
|
type RespList struct {
|
|
ID ObjectID `json:"id"`
|
|
BatchNum string `json:"batchNum" ` //批次号
|
|
App AppType `json:"app" ` //app ysAppVideo--音色短视频 pfAppVideo--泡芙视频 ltAppVpn--雷霆加速器
|
|
Channel string `json:"channel" ` //渠道号
|
|
Code string `json:"code" ` //兑换码
|
|
Authority AuthorityType `json:"authority" ` //兑换权限 shortVideoVip--短视频vip filmVip--影视vip(影院) superVip--超级vip(可以兑换短视频,也可兑换影视) gold--兑换金币
|
|
Status ExchangeStatus `json:"status" ` //状态 unused: 未使用,used: 已兑换,expired:已过期
|
|
Reward int `json:"reward" ` //奖励值
|
|
RewardCount int `json:"rewardCount" ` //奖励量
|
|
UsableNum int `json:"usableNum" bson:"usableNum"` //可用次数
|
|
Operator string `json:"operator" ` //操作者
|
|
Remark string `json:"remark" ` //备注
|
|
EffectiveAt time.Time `json:"effectiveAt" ` //生效时间
|
|
InvalidAt time.Time `json:"invalidAt" ` //失效时间
|
|
CreatedAt time.Time `json:"createdAt" ` //创建时间
|
|
UpdatedAt time.Time `json:"updatedAt"` //更新时间
|
|
}
|