using System;
using System.Collections.Generic;
namespace WotBlitzStatisticsPro.Common.Model
{
///
/// Information about player
///
public class AccountInfoResponse: IStatisticsResponse
{
///
/// Player account identifier
///
public long AccountId { get; set; }
///
/// Account creation date
///
public DateTime CreatedAt { get; set; } = new DateTime(1970, 1, 1);
///
/// Player's nick
///
public string? Nickname { get; set; }
///
/// Tank id, which kills max frags per battle
///
public long MaxFragsTankId { get; set; }
///
/// Tank Id which created max experience per battle
///
public long MaxXpTankId { get; set; }
///
/// Average tier
///
public double AvgTier { get; set; }
///
/// All player's tanks
///
public List? Tanks { get; set; }
///
/// Clan info
///
public ClanInfoResponse? ClanInfo { get; set; }
///
/// Account Region and request language
///
public RealmAndLanguage RegionAndLanguage { get; set; } = new(RealmType.Eu, RequestLanguage.En);
#region statistics
///
/// Last battle time
///
public DateTime LastBattleTime { get; set; } = new DateTime(1970, 1, 1);
///
/// Battles count
///
public long Battles { get; set; }
///
/// Capture points
///
public long CapturePoints { get; set; }
///
/// Total damage amount
///
public long DamageDealt { get; set; }
///
/// Total amount of received damage
///
public long DamageReceived { get; set; }
///
/// Dropped capture points
///
public long DroppedCapturePoints { get; set; }
///
/// Total amount of frags
///
public long Frags { get; set; }
///
/// Total amount of fras grater ten 8 lvl
///
public long Frags8P { get; set; }
///
/// Total amount of hits
///
public long Hits { get; set; }
///
/// Total amount of losses
///
public long Losses { get; set; }
///
/// Max frags per battle
///
public long MaxFrags { get; set; }
///
/// Max experience per battle
///
public long MaxXp { get; set; }
///
/// Total shots count
///
public long Shots { get; set; }
///
/// Total count of spotted vehicles
///
public long Spotted { get; set; }
///
/// Total count of survived battles
///
public long SurvivedBattles { get; set; }
///
/// Total count of survived and won battles
///
public long WinAndSurvived { get; set; }
///
/// Total wins count
///
public long Wins { get; set; }
///
/// Total amount of experience
///
public long Xp { get; set; }
///
/// Wn7 coefficient
///
public double Wn7 { get; set; }
///
/// Player's win rate
///
public decimal WinRate => Battles == 0 ? 0m : (decimal)100 * Wins / Battles;
///
/// Player's average damage
///
public decimal AvgDamage => Battles == 0 ? 0m : (decimal)DamageDealt / Battles;
///
/// Player's average XP
///
public decimal AvgXp => Battles == 0 ? 0m : (decimal)Xp / Battles;
///
/// Damage coefficient
///
public decimal DamageCoefficient => DamageReceived == 0 ? 0m : (decimal)DamageDealt / DamageReceived;
///
/// Rate of survival
///
public decimal SurvivalRate => Battles == 0 ? 0m : (decimal)100 * SurvivedBattles / Battles;
#endregion
}
}