use super::GrandCompany; #[cfg(feature = "with_serde")] use serde::{Deserialize, Serialize}; use ffxiv_types::{World, Race, Clan, Guardian}; use url::Url; use std::collections::BTreeMap; #[derive(Debug)] #[cfg_attr(feature = "with_serde", derive(Deserialize, Serialize))] pub struct Character { pub id: u64, pub name: String, pub world: World, pub race: Race, pub clan: Clan, pub gender: Gender, pub title: Option, pub name_day: String, pub guardian: Guardian, pub city_state: CityState, pub grand_company: Option, #[cfg_attr(feature = "with_serde", serde(with = "crate::util::serde::opt_u64_str"))] pub free_company_id: Option, pub profile_text: String, pub jobs: BTreeMap, // #[cfg_attr(feature = "with_serde", serde(default))] // pub mounts: Vec, // #[cfg_attr(feature = "with_serde", serde(default))] // pub minions: Vec, pub face: Url, pub portrait: Url, } #[derive(Debug, PartialEq)] #[cfg_attr(feature = "with_serde", derive(Deserialize, Serialize))] pub struct GrandCompanyInfo { pub name: GrandCompany, pub rank: String, } #[derive(Debug)] #[cfg_attr(feature = "with_serde", derive(Deserialize, Serialize))] pub struct JobInfo { pub level: Option, } #[derive(Debug)] #[cfg_attr(feature = "with_serde", derive(Deserialize, Serialize))] pub struct Mount { pub name: String, pub icon: Url, } #[derive(Debug)] #[cfg_attr(feature = "with_serde", derive(Deserialize, Serialize))] pub struct Minion { pub name: String, pub icon: Url, } ffxiv_enum!(Gender { Male => "♂", Female => "♀", }); ffxiv_enum!(CityState { Gridania => "gridania", LimsaLominsa => "limsa lominsa", UlDah => "ul'dah", }); ffxiv_enum!( #[derive(Eq, PartialOrd, Ord)] Job { Gladiator => "gladiator", Paladin => "paladin", Marauder => "marauder", Warrior => "warrior", DarkKnight => "dark knight", Gunbreaker => "gunbreaker", Conjurer => "conjurer", WhiteMage => "white mage", Scholar => "scholar", Astrologian => "astrologian", Sage => "sage", Pugilist => "pugilist", Monk => "monk", Lancer => "lancer", Dragoon => "dragoon", Rogue => "rogue", Ninja => "ninja", Samurai => "samurai", Archer => "archer", Bard => "bard", Machinist => "machinist", Thaumaturge => "thaumaturge", BlackMage => "black mage", Arcanist => "arcanist", Summoner => "summoner", RedMage => "red mage", BlueMage => "blue mage", Dancer => "dancer", Reaper => "reaper", Carpenter => "carpenter", Blacksmith => "blacksmith", Armorer => "armorer", Goldsmith => "goldsmith", Leatherworker => "leatherworker", Weaver => "weaver", Alchemist => "alchemist", Culinarian => "culinarian", Miner => "miner", Botanist => "botanist", Fisher => "fisher", } );