Model for a social timeline entry. It holds a Type string, parsed Data using a custom JsonConverter TimelineEventDataConverter, and a Date long. It also defines an EventTime field computed from Date as a DateTime.
#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;
}