2021-08-29 14:10:10 -04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace SharedLibraryCore.Dtos
|
|
|
|
|
{
|
|
|
|
|
public class ClientHistoryInfo
|
|
|
|
|
{
|
|
|
|
|
public long ServerId { get; set; }
|
2022-03-29 17:42:53 -04:00
|
|
|
|
public List<ClientCountSnapshot> ClientCounts { get; set; } = new();
|
2021-08-29 14:10:10 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ClientCountSnapshot
|
|
|
|
|
{
|
2022-03-29 17:42:53 -04:00
|
|
|
|
private const int UpdateInterval = 5;
|
2021-08-29 14:10:10 -04:00
|
|
|
|
public DateTime Time { get; set; }
|
2022-03-29 17:42:53 -04:00
|
|
|
|
public string TimeString => new DateTime(Time.Year, Time.Month, Time.Day, Time.Hour,
|
|
|
|
|
Math.Min(59, UpdateInterval * (int)Math.Round(Time.Minute / (float)UpdateInterval)), 0)
|
|
|
|
|
.ToString("yyyy-MM-ddTHH:mm:ssZ");
|
2021-08-29 14:10:10 -04:00
|
|
|
|
public int ClientCount { get; set; }
|
2022-03-29 17:42:53 -04:00
|
|
|
|
public bool ConnectionInterrupted { get;set; }
|
|
|
|
|
public string Map { get; set; }
|
|
|
|
|
public string MapAlias { get; set; }
|
2021-08-29 14:10:10 -04:00
|
|
|
|
}
|
2022-03-29 17:42:53 -04:00
|
|
|
|
}
|