DB Schema Update
This commit is contained in:
parent
07e6df6b64
commit
8fd4321944
3 changed files with 10 additions and 9 deletions
|
@ -13,7 +13,7 @@ pub struct Portrait {
|
||||||
pub id: i32,
|
pub id: i32,
|
||||||
pub group_id: i32,
|
pub group_id: i32,
|
||||||
pub hires: String,
|
pub hires: String,
|
||||||
pub lores: Option<String>,
|
pub lores: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, ToSchema, Debug, FromRow)]
|
#[derive(Serialize, ToSchema, Debug, FromRow)]
|
||||||
|
@ -39,12 +39,13 @@ pub struct Ethic {
|
||||||
#[derive(Serialize, ToSchema, Debug, FromRow)]
|
#[derive(Serialize, ToSchema, Debug, FromRow)]
|
||||||
pub struct Empire {
|
pub struct Empire {
|
||||||
pub id: i32,
|
pub id: i32,
|
||||||
pub discord_user: Option<String>,
|
|
||||||
pub group_id: i32,
|
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,
|
pub group_game_id: i32,
|
||||||
|
pub name: String,
|
||||||
|
pub discord_user: Option<String>,
|
||||||
|
pub gestalt: bool,
|
||||||
|
pub empire_portrait_id: Option<i32>,
|
||||||
|
pub empire_portrait_group_id: Option<i32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, ToSchema, Debug, FromRow)]
|
#[derive(Serialize, ToSchema, Debug, FromRow)]
|
||||||
|
|
|
@ -74,7 +74,7 @@ pub(crate) async fn empires(
|
||||||
empire_portrait_id: entry.empire_portrait_id,
|
empire_portrait_id: entry.empire_portrait_id,
|
||||||
group_game_id: entry.group_game_id,
|
group_game_id: entry.group_game_id,
|
||||||
discord_user: None,
|
discord_user: None,
|
||||||
gestalt: entry.gestalt
|
gestalt: Some(entry.gestalt)
|
||||||
};
|
};
|
||||||
|
|
||||||
if let Some(auth_token) = params.token.clone() {
|
if let Some(auth_token) = params.token.clone() {
|
||||||
|
@ -249,7 +249,7 @@ pub(crate) async fn portraits(
|
||||||
id: entry.id,
|
id: entry.id,
|
||||||
group_id: entry.group_id,
|
group_id: entry.group_id,
|
||||||
hires: entry.hires.clone(),
|
hires: entry.hires.clone(),
|
||||||
lores: entry.lores.clone()
|
lores: Some(entry.lores.clone())
|
||||||
};
|
};
|
||||||
|
|
||||||
parsed_data.push(new_data);
|
parsed_data.push(new_data);
|
||||||
|
|
|
@ -47,8 +47,8 @@ pub struct Empire {
|
||||||
pub discord_user: Option<String>,
|
pub discord_user: Option<String>,
|
||||||
pub group_id: i32,
|
pub group_id: i32,
|
||||||
pub gestalt: Option<bool>, // TODO: make nn in DB schema
|
pub gestalt: Option<bool>, // TODO: make nn in DB schema
|
||||||
pub empire_portrait_id: i32,
|
pub empire_portrait_id: Option<i32>,
|
||||||
pub empire_portrait_group_id: i32,
|
pub empire_portrait_group_id: Option<i32>,
|
||||||
pub group_game_id: i32,
|
pub group_game_id: i32,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue