persist client count history data across reboots and allow for configurable timespan

This commit is contained in:
RaidMax
2021-08-29 13:10:10 -05:00
parent 02e5e78f67
commit deff4f2947
22 changed files with 213 additions and 59 deletions

View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
namespace SharedLibraryCore.Dtos
{
public class ClientHistoryInfo
{
public long ServerId { get; set; }
public List<ClientCountSnapshot> ClientCounts { get; set; }
}
public class ClientCountSnapshot
{
public DateTime Time { get; set; }
public string TimeString => Time.ToString("yyyy-MM-ddTHH:mm:ssZ");
public int ClientCount { get; set; }
}
}

View File

@ -17,6 +17,7 @@ namespace SharedLibraryCore.Dtos
public List<ChatInfo> ChatHistory { get; set; }
public List<PlayerInfo> Players { get; set; }
public Helpers.PlayerHistory[] PlayerHistory { get; set; }
public List<ClientCountSnapshot> ClientCountHistory { get; set; }
public long ID { get; set; }
public bool Online { get; set; }
public string ConnectProtocolUrl { get; set; }