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::*;
|
|
|
|
|
2022-07-05 20:34:20 +02:00
|
|
|
bot_versions (id) {
|
2021-12-19 00:16:46 +01:00
|
|
|
id -> Int4,
|
2022-07-05 20:34:20 +02:00
|
|
|
bot_id -> Nullable<Int4>,
|
|
|
|
code_bundle_path -> Nullable<Text>,
|
|
|
|
created_at -> Timestamp,
|
|
|
|
container_digest -> Nullable<Text>,
|
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::*;
|
|
|
|
|
2022-07-05 20:34:20 +02:00
|
|
|
bots (id) {
|
2021-12-19 00:16:46 +01:00
|
|
|
id -> Int4,
|
2022-07-05 20:34:20 +02:00
|
|
|
owner_id -> Nullable<Int4>,
|
|
|
|
name -> Text,
|
2021-12-19 00:16:46 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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-07-06 22:41:27 +02:00
|
|
|
bot_version_id -> Nullable<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,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-05 20:34:20 +02:00
|
|
|
joinable!(bot_versions -> bots (bot_id));
|
2021-12-19 00:16:46 +01:00
|
|
|
joinable!(bots -> users (owner_id));
|
2022-07-06 22:41:27 +02:00
|
|
|
joinable!(match_players -> bot_versions (bot_version_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!(
|
2022-07-05 20:34:20 +02:00
|
|
|
bot_versions,
|
2022-05-09 19:41:33 +02:00
|
|
|
bots,
|
|
|
|
match_players,
|
|
|
|
matches,
|
|
|
|
ratings,
|
|
|
|
sessions,
|
|
|
|
users,
|
|
|
|
);
|