feat(tutorial): add /tutorial/gift_top with hardcoded starter present list

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-05-28 12:02:54 -04:00
parent 0f6b3f231a
commit 2034034c1b
9 changed files with 4014 additions and 0 deletions

View File

@@ -95,6 +95,8 @@ public class SVSimDbContext : DbContext
public DbSet<ViewerStoryProgress> ViewerStoryProgress => Set<ViewerStoryProgress>();
public DbSet<ViewerStoryBranchUnlock> ViewerStoryBranchUnlocks => Set<ViewerStoryBranchUnlock>();
public DbSet<ViewerClaimedTutorialGift> ViewerClaimedTutorialGifts => Set<ViewerClaimedTutorialGift>();
#endregion
public override async Task<int> SaveChangesAsync(CancellationToken cancellationToken = default)
@@ -336,6 +338,13 @@ 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);
});
base.OnModelCreating(modelBuilder);
}