@@ 32,3 32,34 @@ pub struct Game {
pub state: GameState,
pub ended_at: String,
}
+
+#[derive(Debug, Serialize, Deserialize, Clone)]
+pub struct Action {
+ pub id: String,
+ pub created_at: String,
+ pub updated_at: String,
+ pub game_data_id: String,
+ pub invoker: String,
+ pub data: String,
+ pub timestamp: String,
+}
+
+#[derive(Debug, Serialize_repr, Deserialize_repr, Clone, PartialEq)]
+#[repr(u8)]
+pub enum GameTurn {
+ Host = 0,
+ Guest = 1,
+}
+
+#[derive(Debug, Serialize, Deserialize, Clone)]
+pub struct GameData {
+ pub id: String,
+ pub created_at: String,
+ pub updated_at: String,
+ pub actions: Vec<Action>,
+ pub turn: GameTurn,
+ pub host_hand: String,
+ pub host_deck: String,
+ pub guest_hand: String,
+ pub guest_deck: String,
+}