// This file is autogenerated by diesel #![allow(unused_imports)] // @generated automatically by Diesel CLI. pub mod sql_types { #[derive(diesel::sql_types::SqlType)] #[diesel(postgres_type(name = "match_state"))] pub struct MatchState; } diesel::table! { use diesel::sql_types::*; use crate::db_types::*; bot_versions (id) { id -> Int4, bot_id -> Nullable, code_bundle_path -> Nullable, created_at -> Timestamp, container_digest -> Nullable, } } diesel::table! { use diesel::sql_types::*; use crate::db_types::*; bots (id) { id -> Int4, owner_id -> Nullable, name -> Text, active_version -> Nullable, } } diesel::table! { use diesel::sql_types::*; use crate::db_types::*; maps (id) { id -> Int4, name -> Text, file_path -> Text, } } diesel::table! { use diesel::sql_types::*; use crate::db_types::*; match_players (match_id, player_id) { match_id -> Int4, player_id -> Int4, bot_version_id -> Nullable, had_errors -> Nullable, } } diesel::table! { use diesel::sql_types::*; use crate::db_types::*; use super::sql_types::MatchState; matches (id) { id -> Int4, state -> MatchState, log_path -> Text, created_at -> Timestamp, winner -> Nullable, is_public -> Bool, map_id -> Nullable, } } diesel::table! { use diesel::sql_types::*; use crate::db_types::*; ratings (bot_id) { bot_id -> Int4, rating -> Float8, } } diesel::table! { use diesel::sql_types::*; use crate::db_types::*; sessions (id) { id -> Int4, user_id -> Int4, token -> Varchar, } } diesel::table! { use diesel::sql_types::*; use crate::db_types::*; users (id) { id -> Int4, username -> Varchar, password_salt -> Bytea, password_hash -> Bytea, } } diesel::joinable!(bots -> users (owner_id)); diesel::joinable!(match_players -> bot_versions (bot_version_id)); diesel::joinable!(match_players -> matches (match_id)); diesel::joinable!(matches -> maps (map_id)); diesel::joinable!(ratings -> bots (bot_id)); diesel::joinable!(sessions -> users (user_id)); diesel::allow_tables_to_appear_in_same_query!( bot_versions, bots, maps, match_players, matches, ratings, sessions, users, );