Preparing for the History query

This commit is contained in:
Mikhail Shabanov committed 2020-11-17 11:01:35 +01:00
1 parent ddbf42e7bb
commit ed52a65788
14 files changed
+334 -6

No files matched your search

@@ -0,0 +1,45 @@
using System;
namespace WotBlitzStatisticsPro.Common.Model
{
/// <summary>
/// Information about player statistics history
/// </summary>
public class AccountInfoHistoryResponse
{
///<summary>
/// Player account identifier
///</summary>
public long AccountId { get; set; }
///<summary>
/// Account creation date
///</summary>
public DateTime CreatedAt { get; set; }
///<summary>
/// Player's nick
///</summary>
public string Nickname { get; set; }
/// <summary>
/// Overall statistics since account creation
/// </summary>
public ShortStatistics OverallAccountStatistics { get; set; }
/// <summary>
/// Statistics for period
/// </summary>
public ShortStatistics PeriodAccountStatistics { get; set; }
/// <summary>
/// Difference between start and end of the period
/// </summary>
public StatisticsDifference PeriodDifference { get; set; }
/// <summary>
/// The detailed history
/// </summary>
public StatisticsDifference[] StatisticsHistory { get; set; }
}
}
@@ -0,0 +1,46 @@
using System;
namespace WotBlitzStatisticsPro.Common.Model
{
/// <summary>
/// Short statistics info
/// </summary>
public class ShortStatistics
{
///<summary>
/// Last battle time
///</summary>
public DateTime LastBattleTime { get; set; }
///<summary>
/// Battles count
///</summary>
public long Battles { get; set; }
/// <summary>
/// Average tier
/// </summary>
public double AvgTier { get; set; }
/// <summary>
/// Wn7 coefficient
/// </summary>
public double Wn7 { get; set; }
/// <summary>
/// Player's win rate
/// </summary>
public decimal WinRate { get; set; }
/// <summary>
/// Player's average damage
/// </summary>
public decimal AvgDamage { get; set; }
/// <summary>
/// Player's average XP
/// </summary>
public decimal AvgXp { get; set; }
}
}
@@ -0,0 +1,46 @@
using System;
namespace WotBlitzStatisticsPro.Common.Model
{
/// <summary>
/// The difference between current statistics state and previous
/// </summary>
public class StatisticsDifference
{
///<summary>
/// Last battle time
///</summary>
public DateTime LastBattleTime { get; set; }
///<summary>
/// Difference in Battles count
///</summary>
public StatisticsDifferenceItem<long> Battles { get; set; }
/// <summary>
/// Difference in Average tier
/// </summary>
public StatisticsDifferenceItem<double> AvgTier { get; set; }
/// <summary>
/// Difference in Wn7 coefficient
/// </summary>
public StatisticsDifferenceItem<double> Wn7 { get; set; }
/// <summary>
/// Difference in Player's win rate
/// </summary>
public StatisticsDifferenceItem<decimal> WinRate { get; set; }
/// <summary>
/// Difference in Player's average damage
/// </summary>
public StatisticsDifferenceItem<decimal> AvgDamage { get; set; }
/// <summary>
/// Difference in Player's average XP
/// </summary>
public StatisticsDifferenceItem<decimal> AvgXp { get; set; }
}
}
@@ -0,0 +1,18 @@
namespace WotBlitzStatisticsPro.Common.Model
{
/// <summary>
/// Represents the difference of one statistics parameter
/// </summary>
public class StatisticsDifferenceItem<T> where T: struct
{
/// <summary>
/// The current value of statistics item
/// </summary>
public T CurrentValue { get; set; }
/// <summary>
/// The difference between current and previous value
/// </summary>
public T? Difference { get; set; }
}
}