use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize)]
pub struct Corporation {
  pub alliance_id: Option<i32>,
  pub ceo_id: i32,
  pub creator_id: i32,
  pub date_founded: Option<DateTime<Utc>>,
  pub description: Option<String>,
  pub faction_id: Option<i32>,
  pub home_station_id: Option<i32>,
  pub member_count: i32,
  pub name: String,
  pub shares: Option<i64>,
  pub tax_rate: f32,
  pub ticker: String,
  pub url: Option<String>,
  pub war_eligible: Option<bool>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct CorporationStructure {
  pub corporation_id: i32,
  pub fuel_expires: Option<DateTime<Utc>>,
  pub name: Option<String>,
  pub next_reinforce_apply: Option<DateTime<Utc>>,
  pub next_reinforce_hour: Option<i32>,
  pub profile_id: i32,
  pub reinforce_hour: Option<i32>,
  pub services: Option<Vec<CorporationService>>,
  pub state: String,
  pub state_timer_end: Option<DateTime<Utc>>,
  pub state_timer_start: Option<DateTime<Utc>>,
  pub structure_id: i64,
  pub system_id: i32,
  pub type_id: i32,
  pub unanchors_at: Option<DateTime<Utc>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct CorporationService {
  pub name: String,
  pub state: String,
}
