feat(packs): add PackDraw* tables and IsEnabled column
Three new EF entities and a migration:
- PackDrawConfigEntry (per-pack: animation rate, has-bonus flag, special-kind label)
- PackDrawSlotRateEntry (pack/slot/tier -> rate, unique index)
- PackDrawCardWeightEntry (per-card-rate facts incl rate-less rows)
DrawSlot {General, Eighth, Bonus} and DrawTier {Bronze, Silver, Gold, Legendary, Special}.
Special collapses leader_card and limited_time_leader (verified mutually exclusive per pack).
IsEnabled column on PackConfigEntry — admin gate for synthesized stubs, distinct from
the wire-mirror IsHide.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1500,6 +1500,9 @@ namespace SVSim.Database.Migrations
|
||||
b.Property<int>("GachaType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("IsEnabled")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("IsHide")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
@@ -1538,6 +1541,110 @@ namespace SVSim.Database.Migrations
|
||||
b.ToTable("Packs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SVSim.Database.Models.PackDrawCardWeightEntry", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||||
|
||||
b.Property<long>("CardId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("DateCreated")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<DateTime?>("DateUpdated")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<bool>("IsAltArt")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("IsLeader")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("PackId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<double?>("RatePct")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<int>("Slot")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Tier")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("PackId", "Slot", "Tier");
|
||||
|
||||
b.ToTable("PackDrawCardWeights");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SVSim.Database.Models.PackDrawConfigEntry", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<double>("AnimationRatePct")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<DateTime>("DateCreated")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<DateTime?>("DateUpdated")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<bool>("HasBonusSlot")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("ShortCode")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("SpecialKind")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("PackDrawConfigs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SVSim.Database.Models.PackDrawSlotRateEntry", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||||
|
||||
b.Property<DateTime>("DateCreated")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<DateTime?>("DateUpdated")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int>("PackId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<double>("RatePct")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<int>("Slot")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Tier")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("PackId", "Slot", "Tier")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("PackDrawSlotRates");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SVSim.Database.Models.PaymentItemEntry", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
|
||||
Reference in New Issue
Block a user