A simple data model for a social timeline entry in LichessNET. It stores a Type string, a Data payload using a custom JSON converter, a Date as a Unix milliseconds long, and an EventTime computed from Date.
#nullable enable annotations
namespace LichessNET.Entities.Social.Timeline;
public class TimelineEntry
{
public string Type { get; set; }
[JsonConverter(typeof(TimelineEventDataConverter))]
public TimelineEventData Data { get; set; }
public long Date { get; set; }
public DateTime EventTime => DateTimeOffset.FromUnixTimeMilliseconds(Date).DateTime;
}