feat(db): AddArenaTwoPick migration (rewards + viewer-run tables)

Register ArenaTwoPickRewards and ViewerArenaTwoPickRuns DbSets in SVSimDbContext and generate the AddArenaTwoPick migration with both CreateTable calls, all four jsonb columns on the run table, and the correct indexes (WinCount scalar + unique WinCount/RewardType/RewardId on rewards; unique ViewerId on runs).
This commit is contained in:
gamer147
2026-05-31 10:20:37 -04:00
parent 1dbc5fa831
commit 5faa5e2445
4 changed files with 4237 additions and 0 deletions

View File

@@ -450,6 +450,36 @@ namespace SVSim.Database.Migrations
b.ToTable("ArenaSeasons");
});
modelBuilder.Entity("SVSim.Database.Models.ArenaTwoPickReward", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<long>("RewardId")
.HasColumnType("bigint");
b.Property<int>("RewardNum")
.HasColumnType("integer");
b.Property<int>("RewardType")
.HasColumnType("integer");
b.Property<int>("WinCount")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("WinCount");
b.HasIndex("WinCount", "RewardType", "RewardId")
.IsUnique();
b.ToTable("ArenaTwoPickRewards");
});
modelBuilder.Entity("SVSim.Database.Models.AvatarAbilityEntry", b =>
{
b.Property<int>("Id")
@@ -2482,6 +2512,83 @@ namespace SVSim.Database.Migrations
b.ToTable("ViewerAchievements");
});
modelBuilder.Entity("SVSim.Database.Models.ViewerArenaTwoPickRun", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<string>("CandidateClassIdsJson")
.IsRequired()
.HasColumnType("jsonb");
b.Property<int>("ChallengeId")
.HasColumnType("integer");
b.Property<int>("ClassId")
.HasColumnType("integer");
b.Property<DateTime>("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property<long>("EntryId")
.HasColumnType("bigint");
b.Property<bool>("IsRetire")
.HasColumnType("boolean");
b.Property<bool>("IsSelectCompleted")
.HasColumnType("boolean");
b.Property<long>("LeaderSkinId")
.HasColumnType("bigint");
b.Property<int>("LossCount")
.HasColumnType("integer");
b.Property<int>("MaxBattleCount")
.HasColumnType("integer");
b.Property<long>("NextCandidateId")
.HasColumnType("bigint");
b.Property<string>("PendingPickSetsJson")
.IsRequired()
.HasColumnType("jsonb");
b.Property<string>("ResultListJson")
.IsRequired()
.HasColumnType("jsonb");
b.Property<int>("RewardScheduleId")
.HasColumnType("integer");
b.Property<int>("SelectTurn")
.HasColumnType("integer");
b.Property<string>("SelectedCardIdsJson")
.IsRequired()
.HasColumnType("jsonb");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property<long>("ViewerId")
.HasColumnType("bigint");
b.Property<int>("WinCount")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("ViewerId")
.IsUnique();
b.ToTable("ViewerArenaTwoPickRuns");
});
modelBuilder.Entity("SVSim.Database.Models.ViewerBattlePassClaimEntry", b =>
{
b.Property<long>("Id")