warframe/market/models/
user_short.rs

1use chrono::{
2    DateTime,
3    Utc,
4};
5use serde::Deserialize;
6
7use super::activity::Activity;
8
9#[derive(Debug, Clone, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
10#[serde(rename_all = "camelCase")]
11pub struct UserShort {
12    pub id: String,
13    /// In-game name of the user.
14    pub ingame_name: String,
15    /// Optional avatar image.
16    pub avatar: Option<String>,
17    /// Reputation score.
18    pub reputation: u16,
19    /// Preferred communication language (e.g., 'en', 'ko', 'es').
20    pub locale: String,
21    /// Gaming platform used by the user.
22    pub platform: String,
23    pub crossplay: bool,
24
25    /// Current status of the user.
26    pub status: Status,
27    /// Addition to the status, current activity of the user.
28    pub activity: Activity,
29    /// Timestamp of the user's last online presence.
30    pub last_seen: DateTime<Utc>,
31}
32
33#[derive(Debug, Clone, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash, Copy)]
34#[serde(rename_all = "snake_case")]
35/// Represents the status of a user.
36pub enum Status {
37    Ingame,
38    Online,
39    Offline,
40}