2022-01-03 22:44:01 +00:00
|
|
|
// 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,
|
2022-02-27 19:35:22 +00:00
|
|
|
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-06-10 19:09:33 +00:00
|
|
|
code_bundle_id -> Nullable<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,
|
2022-05-29 09:41:52 +00:00
|
|
|
winner -> Nullable<Int4>,
|
2022-01-02 15:14:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-05-09 17:41:33 +00:00
|
|
|
table! {
|
|
|
|
use diesel::sql_types::*;
|
|
|
|
use crate::db_types::*;
|
|
|
|
|
|
|
|
ratings (bot_id) {
|
|
|
|
bot_id -> Int4,
|
|
|
|
rating -> Float8,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-13 21:41:20 +00:00
|
|
|
table! {
|
2022-01-03 22:33:00 +00:00
|
|
|
use diesel::sql_types::*;
|
|
|
|
use crate::db_types::*;
|
|
|
|
|
2021-12-13 21:41:20 +00:00
|
|
|
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::*;
|
|
|
|
|
2021-12-13 21:41:20 +00:00
|
|
|
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));
|
2022-05-09 17:41:33 +00:00
|
|
|
joinable!(ratings -> bots (bot_id));
|
2021-12-13 21:41:20 +00:00
|
|
|
joinable!(sessions -> users (user_id));
|
|
|
|
|
2022-05-09 17:41:33 +00:00
|
|
|
allow_tables_to_appear_in_same_query!(
|
|
|
|
bots,
|
|
|
|
code_bundles,
|
|
|
|
match_players,
|
|
|
|
matches,
|
|
|
|
ratings,
|
|
|
|
sessions,
|
|
|
|
users,
|
|
|
|
);
|