feat(db): add gacha-point balance + received tables
This commit is contained in:
@@ -167,6 +167,16 @@ public class SVSimDbContext : DbContext
|
||||
b.HasIndex("ViewerId", "ProductId").IsUnique();
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Viewer>().OwnsMany(v => v.GachaPointBalances, b =>
|
||||
{
|
||||
b.HasIndex("ViewerId", "PackId").IsUnique();
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Viewer>().OwnsMany(v => v.GachaPointReceived, b =>
|
||||
{
|
||||
b.HasIndex("ViewerId", "PackId", "CardId").IsUnique();
|
||||
});
|
||||
|
||||
// A given social account links to exactly one viewer — two viewers cannot share the same
|
||||
// Steam (or Facebook, etc.) account. This is the dedup backstop the auth handler's find-
|
||||
// or-link path (SteamSessionAuthenticationHandler) relies on: two concurrent first-Steam-
|
||||
|
||||
Reference in New Issue
Block a user