tetrio_api/models/users/
user_info.rs1
2use serde::{Deserialize, Serialize};
3use crate::models::common::{APIint, APIintarray, APIstring};
4use crate::models::packet::Packet;
5use crate::models::users::user_badge::UserBadge;
6use crate::models::users::user_connections::UserConnections;
7use crate::models::users::user_distinguishment::UserDistinguishment;
8use std::collections::HashMap;
9use crate::models::users::user_role::UserRole;
10
11use super::user_achievements::UserArCounts;
12
13
14#[derive(Debug, Clone, Deserialize, Serialize)]
38pub struct UserInfo {
39
40 #[serde(flatten)]
41 pub ignored_fields: HashMap<String, serde_json::Value>,
42 #[serde(rename = "_id")]
43 pub id: APIstring,
44 pub username: APIstring,
45 pub role: UserRole,
46 pub ts: Option<APIstring>,
47 pub botmaster: Option<APIstring>,
48 pub badges: Box<[UserBadge]>,
49 pub xp: f64,
50 pub gamesplayed: APIint,
51 pub gameswon: APIint,
52 pub gametime: f64,
53 pub country: Option<APIstring>,
54 pub badstanding: Option<bool>,
55 pub supporter: Option<bool>,
56 pub supporter_tier: APIint,
57 pub avatar_revision: Option<APIint>,
58 pub banner_revision: Option<APIint>,
59 pub bio: Option<APIstring>,
60 pub connections: UserConnections,
61 pub friend_count: Option<APIint>,
62 pub distinguishment: Option<UserDistinguishment>,
63 pub achievements: Box<APIintarray>,
64 pub ar: APIint,
65 pub ar_counts: UserArCounts
66}
67
68
69pub type UserInfoPacket = Packet<UserInfo>;
70
71