aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/src/db/matches.rs
diff options
context:
space:
mode:
authorIlion Beyst <ilion.beyst@gmail.com>2022-01-03 23:33:00 +0100
committerIlion Beyst <ilion.beyst@gmail.com>2022-01-03 23:36:19 +0100
commit5b10d5e98e806ce867d27c4cc7b7f5651656744f (patch)
tree1397bc803f1b87e8811be05334a7aeb45032811b /planetwars-server/src/db/matches.rs
parent1cde40b45916d1f99a4cda7837b516cde761f127 (diff)
downloadplanetwars.dev-5b10d5e98e806ce867d27c4cc7b7f5651656744f.tar.xz
planetwars.dev-5b10d5e98e806ce867d27c4cc7b7f5651656744f.zip
add match_state to matches
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,
}