Files
SVSimServer/SVSim.Database/Models/ViewerRankProgress.cs
gamer147 9f97837211 feat(rank): add ViewerRankProgress owned entity + migration
One row per (viewer, format) tracking accumulated Point + MasterPoint.
Unique index on (ViewerId, Format) enforces one row per format per viewer
(mirrors owned-collection precedent per project_owned_collection_unique_index).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-04 10:13:50 -04:00

18 lines
542 B
C#

using Microsoft.EntityFrameworkCore;
using SVSim.Database.Enums;
namespace SVSim.Database.Models;
/// <summary>
/// One row per (viewer, format) tracking accumulated rank points and master points.
/// Point is 0-based cumulative; the current rank_id is derived at read time from Point
/// (and MasterPoint once past 50000). Owned collection on <see cref="Viewer"/>.
/// </summary>
[Owned]
public class ViewerRankProgress
{
public Format Format { get; set; }
public int Point { get; set; }
public int MasterPoint { get; set; }
}