57 lines
1.2 KiB
Rust
57 lines
1.2 KiB
Rust
use serde::Serialize;
|
|
use sqlx::FromRow;
|
|
use utoipa::ToSchema;
|
|
|
|
#[derive(Serialize, ToSchema, Debug, FromRow)]
|
|
pub struct PortraitGroup {
|
|
pub id: i32,
|
|
pub name: String,
|
|
}
|
|
|
|
#[derive(Serialize, ToSchema, Debug, FromRow)]
|
|
pub struct Portrait {
|
|
pub id: i32,
|
|
pub group_id: i32,
|
|
pub hires: String,
|
|
pub lores: Option<String>,
|
|
}
|
|
|
|
#[derive(Serialize, ToSchema, Debug, FromRow)]
|
|
pub struct Game {
|
|
pub id: i32,
|
|
pub name: String,
|
|
}
|
|
|
|
#[derive(Serialize, ToSchema, Debug, FromRow)]
|
|
pub struct GameGroup {
|
|
pub id: i32,
|
|
pub game_id: i32,
|
|
pub name: String,
|
|
}
|
|
|
|
#[derive(Serialize, ToSchema, Debug, FromRow)]
|
|
pub struct Ethic {
|
|
pub id: i32,
|
|
pub name: String,
|
|
pub machine_ethic: bool,
|
|
}
|
|
|
|
#[derive(Serialize, ToSchema, Debug, FromRow)]
|
|
pub struct Empire {
|
|
pub id: i32,
|
|
pub discord_user: Option<String>,
|
|
pub group_id: i32,
|
|
pub gestalt: Option<bool>, // TODO: make nn in DB schema
|
|
pub empire_portrait_id: i32,
|
|
pub empire_portrait_group_id: i32,
|
|
pub group_game_id: i32,
|
|
}
|
|
|
|
#[derive(Serialize, ToSchema, Debug, FromRow)]
|
|
pub struct EmpireEthic {
|
|
pub empires_id: i32,
|
|
pub empires_group_id: i32,
|
|
pub empires_group_game_id: i32,
|
|
pub ethics_id: i32,
|
|
pub ethics_fanatic: bool,
|
|
}
|