refactor(db): remove ViewerClaimedTutorialGift — replaced by ViewerPresent.Status
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Records that a viewer has claimed a specific tutorial gift present_id. Composite key
|
||||
/// (ViewerId, PresentId) — viewer can't claim the same present twice.
|
||||
/// </summary>
|
||||
public class ViewerClaimedTutorialGift
|
||||
{
|
||||
public long ViewerId { get; set; }
|
||||
public string PresentId { get; set; } = string.Empty;
|
||||
public DateTime ClaimedAt { get; set; }
|
||||
|
||||
public Viewer Viewer { get; set; } = null!;
|
||||
}
|
||||
@@ -101,7 +101,6 @@ public class SVSimDbContext : DbContext
|
||||
public DbSet<ViewerStoryProgress> ViewerStoryProgress => Set<ViewerStoryProgress>();
|
||||
public DbSet<ViewerStoryBranchUnlock> ViewerStoryBranchUnlocks => Set<ViewerStoryBranchUnlock>();
|
||||
|
||||
public DbSet<ViewerClaimedTutorialGift> ViewerClaimedTutorialGifts => Set<ViewerClaimedTutorialGift>();
|
||||
public DbSet<ViewerPresent> ViewerPresents => Set<ViewerPresent>();
|
||||
|
||||
public DbSet<ArenaTwoPickReward> ArenaTwoPickRewards { get; set; } = null!;
|
||||
@@ -367,13 +366,6 @@ public class SVSimDbContext : DbContext
|
||||
b.HasIndex(e => new { e.ViewerId, e.Period });
|
||||
});
|
||||
|
||||
modelBuilder.Entity<ViewerClaimedTutorialGift>(b =>
|
||||
{
|
||||
b.HasKey(g => new { g.ViewerId, g.PresentId });
|
||||
b.HasOne(g => g.Viewer).WithMany().HasForeignKey(g => g.ViewerId).OnDelete(DeleteBehavior.Cascade);
|
||||
b.Property(g => g.PresentId).HasMaxLength(64);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<ViewerPresent>(b =>
|
||||
{
|
||||
b.HasKey(p => p.Id);
|
||||
|
||||
Reference in New Issue
Block a user