artifacts/models/
character_stats_schema.rs1use crate::models;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
5#[cfg_attr(feature = "specta", derive(specta::Type))]
6pub struct CharacterStatsSchema {
7 #[serde(rename = "monsters_killed", skip_serializing_if = "Option::is_none")]
8 #[cfg_attr(feature = "specta", specta(type = Option<specta_util::Unknown>))]
9 pub monsters_killed: Option<std::collections::HashMap<String, i32>>,
10 #[serde(rename = "resources_gathered", skip_serializing_if = "Option::is_none")]
11 #[cfg_attr(feature = "specta", specta(type = Option<specta_util::Unknown>))]
12 pub resources_gathered: Option<std::collections::HashMap<String, i32>>,
13 #[serde(rename = "action_counts", skip_serializing_if = "Option::is_none")]
14 #[cfg_attr(feature = "specta", specta(type = Option<specta_util::Unknown>))]
15 pub action_counts: Option<std::collections::HashMap<String, i32>>,
16 #[serde(rename = "deaths", skip_serializing_if = "Option::is_none")]
17 pub deaths: Option<i32>,
18}
19
20impl CharacterStatsSchema {
21 pub fn new() -> CharacterStatsSchema {
22 CharacterStatsSchema {
23 monsters_killed: None,
24 resources_gathered: None,
25 action_counts: None,
26 deaths: None,
27 }
28 }
29}