refactor(db): remove ViewerClaimedTutorialGift — replaced by ViewerPresent.Status

This commit is contained in:
gamer147
2026-06-08 20:38:09 -04:00
parent fafd7ea183
commit 6098682162
2 changed files with 0 additions and 22 deletions

View File

@@ -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!;
}

View File

@@ -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);