use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum EventType { Totw, Seasonal, Special, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct PackWeightBoost { pub rarity: String, pub multiplier: f64, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct EventEffects { pub pack_weight_boosts: Vec, pub bonus_market_cards: Vec, pub unlocks_sbc_ids: Vec, pub unlocks_objective_ids: Vec, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct EventDefinition { pub id: String, pub name: String, pub description: String, pub event_type: EventType, pub starts_at: Option, pub expires_at: Option, pub is_manual: bool, pub effects: EventEffects, } /// Event definition bundled with its current runtime active status. #[derive(Debug, Clone, Serialize)] pub struct EventWithStatus { #[serde(flatten)] pub definition: EventDefinition, pub is_active: bool, pub activated_at: Option, pub deactivated_at: Option, }