Data model for a PuzzleStorm day entry. It stores an Id string and numeric stats like Combo, Errors, Highest, Moves, Runs, Score and Time, and exposes a Date property that parses the Id as "year/month/day" into a System.DateTime.
#nullable enable annotations
namespace LichessNET.Entities.Puzzle.PuzzleStorm;
public class StormDay
{
public string Id { get; set; }
public DateTime Date
{
get
{
return new DateTime(
int.Parse(Id.Split('/')[0]),
int.Parse(Id.Split('/')[1]),
int.Parse(Id.Split('/')[2])
);
}
}
public int Combo { get; set; }
public int Errors { get; set; }
public int Highest { get; set; }
public int Moves { get; set; }
public int Runs { get; set; }
public int Score { get; set; }
public int Time { get; set; }
}