159 lines
5.0 KiB
Go
159 lines
5.0 KiB
Go
package luckygift
|
|
|
|
const (
|
|
DefaultPoolID = "default"
|
|
|
|
StatusDraft = "draft"
|
|
StatusActive = "active"
|
|
StatusPaused = "paused"
|
|
StatusClosed = "closed"
|
|
StatusPending = "pending"
|
|
|
|
PoolNovice = "novice"
|
|
PoolIntermediate = "intermediate"
|
|
PoolAdvanced = "advanced"
|
|
|
|
SourceBaseRTP = "base_rtp"
|
|
SourceRoomAtmosphere = "room_atmosphere"
|
|
SourceActivity = "activity_subsidy"
|
|
SourcePresentation = "presentation_only"
|
|
)
|
|
|
|
// Tier 是单个体验池里的候选奖档;权重只塑造体验节奏,基础成本仍由 RTP 窗口兜住。
|
|
type Tier struct {
|
|
Pool string `json:"pool"`
|
|
TierID string `json:"tier_id"`
|
|
RewardCoins int64 `json:"reward_coins"`
|
|
MultiplierPPM int64 `json:"multiplier_ppm"`
|
|
Weight int64 `json:"weight"`
|
|
HighWaterOnly bool `json:"high_water_only"`
|
|
Enabled bool `json:"enabled"`
|
|
}
|
|
|
|
// Config 是幸运礼物线上规则快照。金额均为整数金币,比例均为 ppm。
|
|
type Config struct {
|
|
AppCode string `json:"app_code"`
|
|
GiftID string `json:"gift_id"`
|
|
PoolID string `json:"pool_id"`
|
|
Enabled bool `json:"enabled"`
|
|
RuleVersion int64 `json:"rule_version"`
|
|
GiftPrice int64 `json:"gift_price"`
|
|
TargetRTPPPM int64 `json:"target_rtp_ppm"`
|
|
PoolRatePPM int64 `json:"pool_rate_ppm"`
|
|
GlobalWindowDraws int64 `json:"global_window_draws"`
|
|
GiftWindowDraws int64 `json:"gift_window_draws"`
|
|
NoviceDrawLimit int64 `json:"novice_draw_limit"`
|
|
IntermediateDrawLimit int64 `json:"intermediate_draw_limit"`
|
|
HighMultiplier int64 `json:"high_multiplier"`
|
|
HighWaterPoolMultiple int64 `json:"high_water_pool_multiple"`
|
|
PlatformPoolWeightPPM int64 `json:"platform_pool_weight_ppm"`
|
|
RoomPoolWeightPPM int64 `json:"room_pool_weight_ppm"`
|
|
GiftPoolWeightPPM int64 `json:"gift_pool_weight_ppm"`
|
|
InitialPlatformPool int64 `json:"initial_platform_pool"`
|
|
InitialGiftPool int64 `json:"initial_gift_pool"`
|
|
InitialRoomPool int64 `json:"initial_room_pool"`
|
|
PlatformReserve int64 `json:"platform_reserve"`
|
|
GiftReserve int64 `json:"gift_reserve"`
|
|
RoomReserve int64 `json:"room_reserve"`
|
|
MaxSinglePayout int64 `json:"max_single_payout"`
|
|
UserHourlyPayoutCap int64 `json:"user_hourly_payout_cap"`
|
|
UserDailyPayoutCap int64 `json:"user_daily_payout_cap"`
|
|
DeviceDailyPayoutCap int64 `json:"device_daily_payout_cap"`
|
|
RoomHourlyPayoutCap int64 `json:"room_hourly_payout_cap"`
|
|
AnchorDailyPayoutCap int64 `json:"anchor_daily_payout_cap"`
|
|
RoomAtmosphereRatePPM int64 `json:"room_atmosphere_rate_ppm"`
|
|
RoomAtmosphereInitial int64 `json:"room_atmosphere_initial"`
|
|
RoomAtmosphereReserve int64 `json:"room_atmosphere_reserve"`
|
|
ActivityBudget int64 `json:"activity_budget"`
|
|
ActivityDailyLimit int64 `json:"activity_daily_limit"`
|
|
LargeTierEnabled bool `json:"large_tier_enabled"`
|
|
MultiplierPPMs []int64 `json:"multiplier_ppms"`
|
|
Tiers []Tier `json:"tiers"`
|
|
UpdatedByAdminID int64 `json:"updated_by_admin_id"`
|
|
CreatedAtMS int64 `json:"created_at_ms"`
|
|
UpdatedAtMS int64 `json:"updated_at_ms"`
|
|
}
|
|
|
|
type CheckCommand struct {
|
|
PoolID string
|
|
GiftID string
|
|
UserID int64
|
|
RoomID string
|
|
}
|
|
|
|
type DrawCommand struct {
|
|
CommandID string
|
|
PoolID string
|
|
UserID int64
|
|
DeviceID string
|
|
RoomID string
|
|
AnchorID string
|
|
GiftID string
|
|
CoinSpent int64
|
|
PaidAtMS int64
|
|
}
|
|
|
|
type CheckResult struct {
|
|
Enabled bool
|
|
Reason string
|
|
PoolID string
|
|
GiftID string
|
|
GiftPrice int64
|
|
RuleVersion int64
|
|
TargetRTPPPM int64
|
|
ExperiencePool string
|
|
}
|
|
|
|
type DrawResult struct {
|
|
DrawID string
|
|
CommandID string
|
|
PoolID string
|
|
GiftID string
|
|
RuleVersion int64
|
|
ExperiencePool string
|
|
SelectedTierID string
|
|
BaseRewardCoins int64
|
|
RoomAtmosphereRewardCoins int64
|
|
ActivitySubsidyCoins int64
|
|
EffectiveRewardCoins int64
|
|
BudgetSourcesJSON string
|
|
RewardStatus string
|
|
RTPWindowIndex int64
|
|
GiftRTPWindowIndex int64
|
|
GlobalBaseRTPPPM int64
|
|
GiftBaseRTPPPM int64
|
|
StageFeedback bool
|
|
HighMultiplier bool
|
|
CreatedAtMS int64
|
|
}
|
|
|
|
type DrawSummary struct {
|
|
PoolID string
|
|
TotalDraws int64
|
|
UniqueUsers int64
|
|
UniqueRooms int64
|
|
TotalSpentCoins int64
|
|
TotalRewardCoins int64
|
|
BaseRewardCoins int64
|
|
RoomAtmosphereRewardCoins int64
|
|
ActivitySubsidyCoins int64
|
|
ActualRTPPPM int64
|
|
PendingDraws int64
|
|
GrantedDraws int64
|
|
FailedDraws int64
|
|
}
|
|
|
|
type AdminConfigQuery struct {
|
|
PoolID string
|
|
}
|
|
|
|
type DrawQuery struct {
|
|
PoolID string
|
|
GiftID string
|
|
UserID int64
|
|
RoomID string
|
|
Status string
|
|
Page int32
|
|
PageSize int32
|
|
}
|