package model import "time" // SmashEggConfig stores the resident smash golden egg activity master config. type SmashEggConfig struct { ID int64 `gorm:"column:id;primaryKey"` SysOrigin string `gorm:"column:sys_origin;size:32;uniqueIndex:uk_smash_egg_config_sys_origin"` Enabled bool `gorm:"column:enabled;index:idx_smash_egg_config_enabled"` Timezone string `gorm:"column:timezone;size:64"` RTPBasisPoints int `gorm:"column:rtp_basis_points"` NewbiePoolEnabled bool `gorm:"column:newbie_pool_enabled"` NewbieWindowDays int `gorm:"column:newbie_window_days"` NewbieMaxDrawCount int `gorm:"column:newbie_max_draw_count"` NewbieMinRechargeAmount int64 `gorm:"column:newbie_min_recharge_amount"` CreateTime time.Time `gorm:"column:create_time"` UpdateTime time.Time `gorm:"column:update_time"` } // TableName returns the smash egg master configuration table name. func (SmashEggConfig) TableName() string { return "smash_egg_config" } // SmashEggDrawOptionConfig stores one draw button option. type SmashEggDrawOptionConfig struct { ID int64 `gorm:"column:id;primaryKey"` ConfigID int64 `gorm:"column:config_id;index:idx_smash_egg_option_config,priority:1"` SysOrigin string `gorm:"column:sys_origin;size:32;index:idx_smash_egg_option_enabled,priority:1"` OptionKey string `gorm:"column:option_key;size:32"` Label string `gorm:"column:label;size:64"` Times int `gorm:"column:times"` PriceGold int64 `gorm:"column:price_gold"` Sort int `gorm:"column:sort"` Enabled bool `gorm:"column:enabled;index:idx_smash_egg_option_enabled,priority:2"` CreateTime time.Time `gorm:"column:create_time"` UpdateTime time.Time `gorm:"column:update_time"` } // TableName returns the smash egg draw option configuration table name. func (SmashEggDrawOptionConfig) TableName() string { return "smash_egg_draw_option_config" } // SmashEggRewardConfig stores one prize on the smash egg activity. type SmashEggRewardConfig struct { ID int64 `gorm:"column:id;primaryKey"` ConfigID int64 `gorm:"column:config_id;index:idx_smash_egg_reward_config,priority:1"` SysOrigin string `gorm:"column:sys_origin;size:32;index:idx_smash_egg_reward_enabled,priority:1"` PoolType string `gorm:"column:pool_type;size:32;index:idx_smash_egg_reward_pool,priority:2"` RewardType string `gorm:"column:reward_type;size:32"` RewardGroupID *int64 `gorm:"column:reward_group_id"` RewardGroupName string `gorm:"column:reward_group_name;size:255"` ResourceType string `gorm:"column:resource_type;size:64"` ResourceURL string `gorm:"column:resource_url;size:512"` CoverURL string `gorm:"column:cover_url;size:512"` AnimationURL string `gorm:"column:animation_url;size:512"` DurationDays int `gorm:"column:duration_days"` DisplayGoldAmount int64 `gorm:"column:display_gold_amount"` GoldAmount int64 `gorm:"column:gold_amount"` RewardValueGold int64 `gorm:"column:reward_value_gold"` Probability int `gorm:"column:probability"` Sort int `gorm:"column:sort"` Enabled bool `gorm:"column:enabled;index:idx_smash_egg_reward_enabled,priority:2"` CreateTime time.Time `gorm:"column:create_time"` UpdateTime time.Time `gorm:"column:update_time"` } // TableName returns the smash egg reward configuration table name. func (SmashEggRewardConfig) TableName() string { return "smash_egg_reward_config" } // SmashEggDrawRecord stores each prize item produced by a smash egg draw. type SmashEggDrawRecord struct { ID int64 `gorm:"column:id;primaryKey"` DrawNo string `gorm:"column:draw_no;size:64;index:idx_smash_egg_draw_record_draw_no"` EventID string `gorm:"column:event_id;size:128;uniqueIndex:uk_smash_egg_draw_record_event"` SysOrigin string `gorm:"column:sys_origin;size:32;index:idx_smash_egg_draw_record_user_time,priority:1;index:idx_smash_egg_draw_record_day,priority:1"` UserID int64 `gorm:"column:user_id;index:idx_smash_egg_draw_record_user_time,priority:2"` PoolType string `gorm:"column:pool_type;size:32;index:idx_smash_egg_draw_record_user_pool,priority:3"` DrawOptionID int64 `gorm:"column:draw_option_id"` DrawTimes int `gorm:"column:draw_times"` PaidGold int64 `gorm:"column:paid_gold"` RewardType string `gorm:"column:reward_type;size:32"` RewardGroupID *int64 `gorm:"column:reward_group_id"` RewardGroupName string `gorm:"column:reward_group_name;size:255"` ResourceType string `gorm:"column:resource_type;size:64"` ResourceURL string `gorm:"column:resource_url;size:512"` CoverURL string `gorm:"column:cover_url;size:512"` AnimationURL string `gorm:"column:animation_url;size:512"` DurationDays int `gorm:"column:duration_days"` DisplayGoldAmount int64 `gorm:"column:display_gold_amount"` GoldAmount int64 `gorm:"column:gold_amount"` RewardValueGold int64 `gorm:"column:reward_value_gold"` Probability int `gorm:"column:probability"` Status string `gorm:"column:status;size:32;index:idx_smash_egg_draw_record_status"` ErrorMessage string `gorm:"column:error_message;size:1024"` CreateTime time.Time `gorm:"column:create_time;index:idx_smash_egg_draw_record_user_time,priority:3;index:idx_smash_egg_draw_record_day,priority:2"` UpdateTime time.Time `gorm:"column:update_time"` } // TableName returns the smash egg draw record table name. func (SmashEggDrawRecord) TableName() string { return "smash_egg_draw_record" }