|
|
|
@@ -0,0 +1,85 @@
|
|
|
|
|
use serde::Deserialize;
|
|
|
|
|
use serde::Serialize;
|
|
|
|
|
|
|
|
|
|
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
#[serde(rename_all = "camelCase")]
|
|
|
|
|
pub struct GetUserRatingApi {
|
|
|
|
|
pub user_id: u32,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
#[serde(rename_all = "camelCase")]
|
|
|
|
|
pub struct GetUserRatingApiResp {
|
|
|
|
|
pub user_id: u32,
|
|
|
|
|
pub user_rating: UserRating,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
#[serde(rename_all = "camelCase")]
|
|
|
|
|
pub struct UserRating {
|
|
|
|
|
pub rating: i64,
|
|
|
|
|
/// b35
|
|
|
|
|
pub rating_list: Vec<RatingList>,
|
|
|
|
|
/// b15
|
|
|
|
|
pub new_rating_list: Vec<RatingList>,
|
|
|
|
|
/// 候补 b35
|
|
|
|
|
pub next_rating_list: Vec<RatingList>,
|
|
|
|
|
/// 候补 b15
|
|
|
|
|
pub next_new_rating_list: Vec<RatingList>,
|
|
|
|
|
pub udemae: Udemae,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
#[serde(rename_all = "camelCase")]
|
|
|
|
|
pub struct RatingList {
|
|
|
|
|
/// Maimai music id
|
|
|
|
|
pub music_id: u32,
|
|
|
|
|
/// difficulty
|
|
|
|
|
///
|
|
|
|
|
/// - 0: BASIC
|
|
|
|
|
/// - 1: ADVANCED
|
|
|
|
|
/// - 2: EXPERT
|
|
|
|
|
/// - 3: MASTER
|
|
|
|
|
/// - 4: RE: MASTER
|
|
|
|
|
/// - 5: Utage 宴会场
|
|
|
|
|
pub level: u32,
|
|
|
|
|
/// 歌曲 ROM 版本(解析未知)
|
|
|
|
|
pub rom_version: i64,
|
|
|
|
|
/// 达成率 * 10000 的整数
|
|
|
|
|
pub achievement: i64,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
#[serde(rename_all = "camelCase")]
|
|
|
|
|
pub struct Udemae {
|
|
|
|
|
pub max_lose_num: i64,
|
|
|
|
|
pub npc_total_win_num: i64,
|
|
|
|
|
pub npc_total_lose_num: i64,
|
|
|
|
|
pub npc_max_win_num: i64,
|
|
|
|
|
pub npc_max_lose_num: i64,
|
|
|
|
|
pub npc_win_num: i64,
|
|
|
|
|
pub npc_lose_num: i64,
|
|
|
|
|
pub rate: i64,
|
|
|
|
|
pub class_value: i64,
|
|
|
|
|
pub max_rate: i64,
|
|
|
|
|
pub max_class_value: i64,
|
|
|
|
|
pub total_win_num: i64,
|
|
|
|
|
pub total_lose_num: i64,
|
|
|
|
|
pub max_win_num: i64,
|
|
|
|
|
pub win_num: i64,
|
|
|
|
|
pub lose_num: i64,
|
|
|
|
|
#[serde(rename = "MaxLoseNum")]
|
|
|
|
|
pub max_lose_num2: i64,
|
|
|
|
|
#[serde(rename = "NpcTotalWinNum")]
|
|
|
|
|
pub npc_total_win_num2: i64,
|
|
|
|
|
#[serde(rename = "NpcTotalLoseNum")]
|
|
|
|
|
pub npc_total_lose_num2: i64,
|
|
|
|
|
#[serde(rename = "NpcMaxWinNum")]
|
|
|
|
|
pub npc_max_win_num2: i64,
|
|
|
|
|
#[serde(rename = "NpcMaxLoseNum")]
|
|
|
|
|
pub npc_max_lose_num2: i64,
|
|
|
|
|
#[serde(rename = "NpcWinNum")]
|
|
|
|
|
pub npc_win_num2: i64,
|
|
|
|
|
#[serde(rename = "NpcLoseNum")]
|
|
|
|
|
pub npc_lose_num2: i64,
|
|
|
|
|
}
|