lodestone-parser/src/models/free_company.rs

42 lines
1.0 KiB
Rust
Raw Normal View History

use super::GrandCompany;
2018-09-02 19:12:52 +00:00
use chrono::{DateTime, Utc};
use ffxiv_types::World;
2022-06-16 14:10:03 +00:00
#[cfg(feature = "with_serde")] use serde::{Deserialize, Serialize};
2018-09-02 19:12:52 +00:00
use url::Url;
2018-09-03 18:41:01 +00:00
use std::collections::BTreeMap;
#[derive(Debug)]
#[cfg_attr(feature = "with_serde", derive(Deserialize, Serialize))]
2018-09-02 19:12:52 +00:00
pub struct FreeCompany {
#[cfg_attr(feature = "with_serde", serde(with = "crate::util::serde::u64_str"))]
pub id: u64,
2018-09-02 19:12:52 +00:00
pub name: String,
pub world: World,
pub slogan: String,
pub crest: Vec<Url>,
2018-09-03 18:41:01 +00:00
pub grand_company: GrandCompany,
2018-09-02 19:12:52 +00:00
pub active_members: u16,
pub rank: u8,
pub pvp_rankings: PvpRankings,
pub formed: DateTime<Utc>,
pub estate: Option<Estate>,
2018-09-03 18:41:01 +00:00
pub reputation: BTreeMap<GrandCompany, u8>,
2018-09-02 19:12:52 +00:00
}
#[derive(Debug)]
#[cfg_attr(feature = "with_serde", derive(Deserialize, Serialize))]
2018-09-02 19:12:52 +00:00
pub struct PvpRankings {
pub weekly: Option<u64>,
pub monthly: Option<u64>,
}
#[derive(Debug)]
#[cfg_attr(feature = "with_serde", derive(Deserialize, Serialize))]
2018-09-02 19:12:52 +00:00
pub struct Estate {
pub name: String,
pub address: String,
pub greeting: String,
}