@@ -0,0 +1,56 @@
|
||||
package advanceordermod
|
||||
|
||||
import "time"
|
||||
|
||||
// AdvanceStatus 预售状态
|
||||
type AdvanceStatus struct {
|
||||
ActivityStatus bool `json:"activityStatus" bson:"activityStatus"` // 预售活动是否开启
|
||||
ActivityPopUp bool `json:"activityPopUp" bson:"activityPopUp"` // 预售活动是否首页弹窗
|
||||
GameActivityPopUp bool `json:"gameActivityPopUp" bson:"gameActivityPopUp"` // 游戏预售是否首页弹窗
|
||||
GameActivityStatus bool `json:"gameActivityStatus" bson:"gameActivityStatus"` // 游戏预售是否开启
|
||||
BalancePayment bool `json:"balancePayment" bson:"balancePayment"` // 是否有尾款支付
|
||||
BalanceAmount int64 `bson:"balanceAmount" json:"balanceAmount"` // 尾款金额
|
||||
Status int `json:"status" bson:"status"` // 预售订单状态
|
||||
StartTime time.Time `json:"startTime" bson:"startTime,omitempty"` // 预售尾款开始时间
|
||||
EndTime time.Time `json:"endTime" bson:"endTime,omitempty"` // 预售尾款结束时间
|
||||
OId string `json:"oid" bson:"oid"` // 预付订单号
|
||||
PrivilegeLimit PrivilegeLimit `json:"privilegeLimit"` // 预付权益
|
||||
}
|
||||
|
||||
type PrivilegeLimit struct {
|
||||
HasLimit bool `json:"hasLimit"` // 是否有权益限制
|
||||
Limit struct {
|
||||
CoinVideoLimitPerDay int64 `json:"coinVideoLimitPerDay"` // 每日金币视频免费次数
|
||||
LuckyDrawLimitPerDay int64 `json:"luckyDrawLimitPerDay"` // 每日抽奖次数限制
|
||||
AiUndressLimitPerDay int64 `json:"aiUndressLimitPerDay"` // 每日ai脱衣次数限制
|
||||
DownloadLimitPerDay int64 `json:"downloadLimitPerDay"` // 每日下载次数限制
|
||||
} `json:"limit"` // 每日限制
|
||||
Remain struct {
|
||||
TodayCoinVideoCount int64 `json:"todayCoinVideoCount"` // 今日剩余金币视频观看次数
|
||||
TodayLuckyDrawCount int64 `json:"todayLuckyDrawCount"` // 今日剩余抽奖次数
|
||||
TodayAiUndressCount int64 `json:"todayAiUndressCount"` // 今日剩余ai脱衣次数
|
||||
TodayDownloadCount int64 `json:"todayDownloadCount"` // 今日剩余下载次数
|
||||
} `json:"remain"` // 当日可使用次数
|
||||
}
|
||||
|
||||
type DebitPlan struct {
|
||||
CoinVideoCount *int64 `bson:"todayUse.coinVideoCount,omitempty"` // 金币视频观看次数
|
||||
LuckyDrawCount *int64 `bson:"todayUse.luckyDrawCount,omitempty"` // 抽奖次数
|
||||
AiUndressCount *int64 `bson:"todayUse.aiUndressCount,omitempty"` // ai脱衣次数
|
||||
DownloadCount *int64 `bson:"todayUse.downloadCount,omitempty"` // 下载次数
|
||||
}
|
||||
|
||||
func (d *DebitPlan) InvertCounts() {
|
||||
if d.CoinVideoCount != nil {
|
||||
*d.CoinVideoCount = -(*d.CoinVideoCount)
|
||||
}
|
||||
if d.LuckyDrawCount != nil {
|
||||
*d.LuckyDrawCount = -(*d.LuckyDrawCount)
|
||||
}
|
||||
if d.AiUndressCount != nil {
|
||||
*d.AiUndressCount = -(*d.AiUndressCount)
|
||||
}
|
||||
if d.DownloadCount != nil {
|
||||
*d.DownloadCount = -(*d.DownloadCount)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user