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