Entities/Social/Timeline/TimelineEntry.cs

Defines TimelineEntry, a data model for a social timeline item with Type, Data, and Date fields and an EventTime computed from Date using Unix milliseconds.

#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;
}