planetwars.dev/planetwars-server/src/schema.rs

80 lines
1.5 KiB
Rust
Raw Normal View History

// This file is autogenerated by diesel
#![allow(unused_imports)]
2021-12-18 23:16:46 +00:00
table! {
2022-01-03 22:33:00 +00:00
use diesel::sql_types::*;
use crate::db_types::*;
2021-12-18 23:16:46 +00:00
bots (id) {
id -> Int4,
2022-02-26 22:07:13 +00:00
owner_id -> Nullable<Int4>,
2021-12-18 23:16:46 +00:00
name -> Text,
}
}
table! {
2022-01-03 22:33:00 +00:00
use diesel::sql_types::*;
use crate::db_types::*;
2021-12-18 23:16:46 +00:00
code_bundles (id) {
id -> Int4,
bot_id -> Nullable<Int4>,
2021-12-18 23:16:46 +00:00
path -> Text,
created_at -> Timestamp,
}
}
2022-01-02 15:14:03 +00:00
table! {
2022-01-03 22:33:00 +00:00
use diesel::sql_types::*;
use crate::db_types::*;
2022-01-02 15:14:03 +00:00
match_players (match_id, player_id) {
match_id -> Int4,
player_id -> Int4,
2022-03-10 22:35:42 +00:00
code_bundle_id -> Int4,
2022-01-02 15:14:03 +00:00
}
}
table! {
2022-01-03 22:33:00 +00:00
use diesel::sql_types::*;
use crate::db_types::*;
2022-01-02 15:14:03 +00:00
matches (id) {
id -> Int4,
2022-01-03 22:33:00 +00:00
state -> Match_state,
2022-01-02 15:14:03 +00:00
log_path -> Text,
created_at -> Timestamp,
}
}
table! {
2022-01-03 22:33:00 +00:00
use diesel::sql_types::*;
use crate::db_types::*;
sessions (id) {
id -> Int4,
user_id -> Int4,
token -> Varchar,
}
}
table! {
2022-01-03 22:33:00 +00:00
use diesel::sql_types::*;
use crate::db_types::*;
users (id) {
id -> Int4,
username -> Varchar,
password_salt -> Bytea,
password_hash -> Bytea,
}
}
2021-12-18 23:16:46 +00:00
joinable!(bots -> users (owner_id));
joinable!(code_bundles -> bots (bot_id));
2022-03-10 22:35:42 +00:00
joinable!(match_players -> code_bundles (code_bundle_id));
2022-01-02 15:14:03 +00:00
joinable!(match_players -> matches (match_id));
joinable!(sessions -> users (user_id));
allow_tables_to_appear_in_same_query!(bots, code_bundles, match_players, matches, sessions, users,);