From 5b10d5e98e806ce867d27c4cc7b7f5651656744f Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Mon, 3 Jan 2022 23:33:00 +0100 Subject: add match_state to matches --- planetwars-server/src/db/matches.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'planetwars-server/src/db') diff --git a/planetwars-server/src/db/matches.rs b/planetwars-server/src/db/matches.rs index 9bf00db..36c2200 100644 --- a/planetwars-server/src/db/matches.rs +++ b/planetwars-server/src/db/matches.rs @@ -1,3 +1,4 @@ +pub use crate::db_types::MatchState; use chrono::NaiveDateTime; use diesel::{BelongingToDsl, QueryDsl, RunQueryDsl}; use diesel::{Connection, GroupedBy, PgConnection, QueryResult}; @@ -7,6 +8,7 @@ use crate::schema::{match_players, matches}; #[derive(Insertable)] #[table_name = "matches"] pub struct NewMatch<'a> { + pub state: MatchState, pub log_path: &'a str, } @@ -25,6 +27,7 @@ pub struct NewMatchPlayer { #[table_name = "matches"] pub struct MatchBase { pub id: i32, + pub state: MatchState, pub log_path: String, pub created_at: NaiveDateTime, } -- cgit v1.2.3