feat(viewer): add FreePackClaims owned collection for daily-free quota tracking
This commit is contained in:
@@ -65,6 +65,8 @@ public class Viewer : BaseEntity<long>
|
||||
|
||||
public List<ViewerPackOpenCount> PackOpenCounts { get; set; } = new List<ViewerPackOpenCount>();
|
||||
|
||||
public List<ViewerFreePackClaim> FreePackClaims { get; set; } = new List<ViewerFreePackClaim>();
|
||||
|
||||
public List<ViewerGachaPointBalance> GachaPointBalances { get; set; } = new List<ViewerGachaPointBalance>();
|
||||
|
||||
public List<ViewerGachaPointReceived> GachaPointReceived { get; set; } = new List<ViewerGachaPointReceived>();
|
||||
|
||||
15
SVSim.Database/Models/ViewerFreePackClaim.cs
Normal file
15
SVSim.Database/Models/ViewerFreePackClaim.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// One row per (viewer, free_gacha_campaign_id). Counts claims and remembers when the last one
|
||||
/// landed so the controller can gate the daily quota. Owned collection on <see cref="Viewer"/>.
|
||||
/// </summary>
|
||||
[Owned]
|
||||
public class ViewerFreePackClaim
|
||||
{
|
||||
public int FreeGachaCampaignId { get; set; }
|
||||
public int ClaimCount { get; set; }
|
||||
public DateTime LastClaimedAt { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user