namespace DorkNet.Server.Data.Entities;
///
/// Admin-curated metadata for a room-scoped leaderboard
/// StatChannel id. The
/// 2020 watch reports raw integer channel ids via
/// POST api/Leaderboard/v1/SetStats; this table lets admins map
/// each channel to a specific room (so the room detail page can list
/// "its" leaderboards) and a human-readable name + ordering hint. Rows
/// here override the hardcoded AdminController.KnownStatChannels
/// fallback. Channels with no row stay listed as "Channel N".
///
/// One row per (room, channel). Repeated SetStats calls for the
/// same channel in different rooms do not share metadata or values.
///
public class LeaderboardChannelMetaEntity
{
/// Room this channel "belongs to" for the per-room detail
/// view. 0 = global / unscoped legacy bucket.
public long RoomId { get; set; }
/// Same int the watch reports for this channel. Only unique
/// together with .
public int Channel { get; set; }
public string Name { get; set; } = string.Empty;
/// When true, a lower stored value is a better score (race
/// times, lap times, etc.). The list endpoint sorts ascending.
public bool LowerIsBetter { get; set; }
/// UI hint: "count" (default), "time-ms" for elapsed-time
/// channels, "score" for points. The SPA formats accordingly.
public string ValueFormat { get; set; } = "count";
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}