1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
use serde::Deserialize;

#[derive(Debug, Deserialize)]
pub struct Characters {
    #[serde(rename = "avatar_list")]
    pub list: Vec<CharacterDetails>,
}

#[derive(Debug, Deserialize)]
pub struct CharacterDetails {
    pub id: u32,
    pub level: u32,
    pub name: String,
    pub element: String,
    pub icon: String,
    pub rarity: u32,
    pub rank: u8,
    pub image: String,
    pub equip: Option<Equipment>,
    pub relics: Option<Vec<Relic>>,
    pub ornaments: Option<Vec<Ornament>>,
    pub ranks: Vec<Rank>,
}

#[derive(Debug, Deserialize)]
pub struct Equipment {
    pub id: u32,
    pub level: u32,
    pub rank: u32,
    pub name: String,
    pub desc: String,
    pub icon: String,
}

#[derive(Debug, Deserialize)]
pub struct Relic {
    pub id: u32,
    pub pos: u32,
    pub name: String,
    pub desc: String,
    pub icon: String,
    pub rarity: u8,
}

#[derive(Debug, Deserialize)]
pub struct Ornament {
    pub id: u32,
    pub level: u8,
    pub pos: u8,
    pub name: String,
    pub desc: String,
    pub rarity: u8,
}

#[derive(Debug, Deserialize)]
pub struct Rank {
    pub id: u32,
    pub pos: u32,
    pub name: String,
    pub icon: String,
    pub desc: String,
    pub is_unlocked: bool
}