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

#[derive(Debug, Serialize, Deserialize)]
pub struct Character {
  pub alliance_id: Option<i32>,
  pub birthday: DateTime<Utc>,
  pub bloodline_id: i32,
  pub corporation_id: i32,
  pub description: Option<String>,
  pub faction_id: Option<i32>,
  pub gender: String,
  pub name: String,
  pub race_id: i32,
  pub security_status: Option<f32>,
  pub title: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct CharacterAgentsResearch {
  pub agent_id: i32,
  pub points_per_day: f32,
  pub remainder_points: f32,
  pub skill_type_id: i32,
  pub started_at: DateTime<Utc>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct CharacterBlueprints {
  pub item_id: i64,
  pub location_flag: String,
  pub location_id: i64,
  pub material_efficiency: i32,
  pub quantity: i32,
  pub runs: i32,
  pub time_efficiency: i32,
  pub type_id: i32,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct CharacterCorporationHistory {
  pub corporation_id: i32,
  pub is_deleted: Option<bool>,
  pub record_id: i32,
  pub start_date: DateTime<Utc>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct CharacterFatigue {
  pub jump_fatigue_expire_date: DateTime<Utc>,
  pub last_jump_date: DateTime<Utc>,
  pub last_update_date: DateTime<Utc>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct CharacterMedals {
  pub corporation_id: i32,
  pub date: DateTime<Utc>,
  pub description: String,
  pub graphics: i32,
  pub issuer_id: i32,
  pub medal_id: i32,
  pub reason: String,
  pub status: String,
  pub title: String,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct CharacterNotifications {
  pub is_read: bool,
  pub notification_id: i64,
  pub sender_id: i32,
  pub text: String,
  pub timestamp: DateTime<Utc>,
  #[serde(rename = "type")]
  pub notification_type: String,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct CharacterNotificationsContacts {
  pub message: String,
  pub notification_id: i64,
  pub send_date: DateTime<Utc>,
  pub sender_character_id: i32,
  pub standing_level: f32,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct CharacterPortrait {
  pub px128x128: String,
  pub px256x256: String,
  pub px512x512: String,
  pub px64x64: String,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct CharacterRoles {
  pub roles: Vec<String>,
  pub roles_at_base: Vec<String>,
  pub roles_at_hq: Vec<String>,
  pub roles_at_other: Vec<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct CharacterStandings {
  pub from_id: i32,
  pub from_type: String,
  pub standing: f32,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct CharacterTitles {
  pub name: String,
  pub title_id: i32,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct CharacterAffiliation {
  pub allliance_id: Option<i32>,
  pub character_id: i32,
  pub corporation_id: i32,
  pub faction_id: Option<i32>,
}
