aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/src/db/matches.rs
diff options
context:
space:
mode:
Diffstat (limited to 'planetwars-server/src/db/matches.rs')
-rw-r--r--planetwars-server/src/db/matches.rs3
1 files changed, 3 insertions, 0 deletions
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,
}