use crate::{ game::{Game, GameSettings, story::GameStory}, player::PlayerId, }; use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; pub use crate::game::GameId; #[cfg_attr(feature = "ssr", derive(::sqlx::FromRow))] #[derive(Debug)] pub struct GameRecord { pub id: GameId, pub host: PlayerId, pub created_at: DateTime, pub game_state: GameRecordState, } #[derive(Debug, Clone, Serialize, Deserialize)] pub enum GameRecordState { Lobby(GameSettings), RoleReveal(Game), Started(Game), GameOver(GameStory), }