aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/src/schema.rs
diff options
context:
space:
mode:
Diffstat (limited to 'planetwars-server/src/schema.rs')
-rw-r--r--planetwars-server/src/schema.rs20
1 files changed, 19 insertions, 1 deletions
diff --git a/planetwars-server/src/schema.rs b/planetwars-server/src/schema.rs
index bf58434..413c4d1 100644
--- a/planetwars-server/src/schema.rs
+++ b/planetwars-server/src/schema.rs
@@ -16,6 +16,22 @@ table! {
}
table! {
+ match_players (match_id, player_id) {
+ match_id -> Int4,
+ bot_id -> Int4,
+ player_id -> Int4,
+ }
+}
+
+table! {
+ matches (id) {
+ id -> Int4,
+ log_path -> Text,
+ created_at -> Timestamp,
+ }
+}
+
+table! {
sessions (id) {
id -> Int4,
user_id -> Int4,
@@ -34,6 +50,8 @@ table! {
joinable!(bots -> users (owner_id));
joinable!(code_bundles -> bots (bot_id));
+joinable!(match_players -> bots (bot_id));
+joinable!(match_players -> matches (match_id));
joinable!(sessions -> users (user_id));
-allow_tables_to_appear_in_same_query!(bots, code_bundles, sessions, users,);
+allow_tables_to_appear_in_same_query!(bots, code_bundles, match_players, matches, sessions, users,);