Pack logic cleanup

This commit is contained in:
gamer147
2026-05-24 09:27:10 -04:00
parent 79209bd70b
commit d9ef9fe1fc
33 changed files with 71175 additions and 245 deletions

View File

@@ -21730,87 +21730,15 @@ namespace SVSim.Database.Migrations
b.Property<string>("Id")
.HasColumnType("text");
b.Property<int>("CardSetIdForResourceDlView")
.HasColumnType("integer");
b.Property<long>("ChallengeTwoPickSleeveId")
.HasColumnType("bigint");
b.Property<bool>("ChallengeUseTwoPickPremiumCard")
.HasColumnType("boolean");
b.Property<DateTime>("DateCreated")
.HasColumnType("timestamp with time zone");
b.Property<DateTime?>("DateUpdated")
.HasColumnType("timestamp with time zone");
b.Property<decimal>("DefaultCrystals")
.HasColumnType("numeric(20,0)");
b.Property<int>("DefaultDegreeId")
.HasColumnType("integer");
b.Property<int>("DefaultEmblemId")
.HasColumnType("integer");
b.Property<decimal>("DefaultEther")
.HasColumnType("numeric(20,0)");
b.Property<int>("DefaultMyPageBackgroundId")
.HasColumnType("integer");
b.Property<decimal>("DefaultRupees")
.HasColumnType("numeric(20,0)");
b.Property<int>("DefaultSleeveId")
.HasColumnType("integer");
b.Property<bool>("IsBattlePassPeriod")
.HasColumnType("boolean");
b.Property<bool>("IsBeginnerMission")
.HasColumnType("boolean");
b.Property<int>("MaxFriends")
.HasColumnType("integer");
b.Property<string>("TsRotationId")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("DefaultDegreeId");
b.HasIndex("DefaultEmblemId");
b.HasIndex("DefaultMyPageBackgroundId");
b.HasIndex("DefaultSleeveId");
b.ToTable("GameConfigurations");
b.HasData(
new
{
Id = "default",
CardSetIdForResourceDlView = 0,
ChallengeTwoPickSleeveId = 0L,
ChallengeUseTwoPickPremiumCard = false,
DateCreated = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
DefaultCrystals = 50000m,
DefaultDegreeId = 300003,
DefaultEmblemId = 100000000,
DefaultEther = 50000m,
DefaultMyPageBackgroundId = 100000000,
DefaultRupees = 50000m,
DefaultSleeveId = 3000011,
IsBattlePassPeriod = false,
IsBeginnerMission = false,
MaxFriends = 20,
TsRotationId = ""
});
});
modelBuilder.Entity("SVSim.Database.Models.ItemEntry", b =>
@@ -26427,6 +26355,9 @@ namespace SVSim.Database.Migrations
b.Property<int?>("Defense")
.HasColumnType("integer");
b.Property<bool>("IsFoil")
.HasColumnType("boolean");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
@@ -34232,37 +34163,230 @@ namespace SVSim.Database.Migrations
modelBuilder.Entity("SVSim.Database.Models.GameConfiguration", b =>
{
b.HasOne("SVSim.Database.Models.DegreeEntry", "DefaultDegree")
.WithMany()
.HasForeignKey("DefaultDegreeId")
.OnDelete(DeleteBehavior.Cascade)
b.OwnsOne("SVSim.Database.Models.GameConfigRoot", "Config", b1 =>
{
b1.Property<string>("GameConfigurationId")
.HasColumnType("text");
b1.HasKey("GameConfigurationId");
b1.ToTable("GameConfigurations");
b1.ToJson("Config");
b1.WithOwner()
.HasForeignKey("GameConfigurationId");
b1.OwnsOne("SVSim.Database.Models.Config.ChallengeConfig", "Challenge", b2 =>
{
b2.Property<string>("GameConfigRootGameConfigurationId")
.HasColumnType("text");
b2.Property<long>("TwoPickSleeveId")
.HasColumnType("bigint");
b2.Property<bool>("UseTwoPickPremiumCard")
.HasColumnType("boolean");
b2.HasKey("GameConfigRootGameConfigurationId");
b2.ToTable("GameConfigurations");
b2.WithOwner()
.HasForeignKey("GameConfigRootGameConfigurationId");
});
b1.OwnsOne("SVSim.Database.Models.Config.DefaultGrantsConfig", "DefaultGrants", b2 =>
{
b2.Property<string>("GameConfigRootGameConfigurationId")
.HasColumnType("text");
b2.Property<decimal>("Crystals")
.HasColumnType("numeric(20,0)");
b2.Property<decimal>("Ether")
.HasColumnType("numeric(20,0)");
b2.Property<decimal>("Rupees")
.HasColumnType("numeric(20,0)");
b2.HasKey("GameConfigRootGameConfigurationId");
b2.ToTable("GameConfigurations");
b2.WithOwner()
.HasForeignKey("GameConfigRootGameConfigurationId");
});
b1.OwnsOne("SVSim.Database.Models.Config.DefaultLoadoutConfig", "DefaultLoadout", b2 =>
{
b2.Property<string>("GameConfigRootGameConfigurationId")
.HasColumnType("text");
b2.Property<int>("DegreeId")
.HasColumnType("integer");
b2.Property<int>("EmblemId")
.HasColumnType("integer");
b2.Property<int>("MyPageBackgroundId")
.HasColumnType("integer");
b2.Property<int>("SleeveId")
.HasColumnType("integer");
b2.HasKey("GameConfigRootGameConfigurationId");
b2.ToTable("GameConfigurations");
b2.WithOwner()
.HasForeignKey("GameConfigRootGameConfigurationId");
});
b1.OwnsOne("SVSim.Database.Models.Config.PackRateConfig", "PackRates", b2 =>
{
b2.Property<string>("GameConfigRootGameConfigurationId")
.HasColumnType("text");
b2.Property<double>("AnimatedRate")
.HasColumnType("double precision");
b2.HasKey("GameConfigRootGameConfigurationId");
b2.ToTable("GameConfigurations");
b2.WithOwner()
.HasForeignKey("GameConfigRootGameConfigurationId");
b2.OwnsOne("SVSim.Database.Models.Config.SlotRarityWeights", "Default", b3 =>
{
b3.Property<string>("PackRateConfigGameConfigRootGameConfigurationId")
.HasColumnType("text");
b3.Property<double>("Bronze")
.HasColumnType("double precision");
b3.Property<double>("Gold")
.HasColumnType("double precision");
b3.Property<double>("Legendary")
.HasColumnType("double precision");
b3.Property<double>("Silver")
.HasColumnType("double precision");
b3.Property<string>("Slot")
.HasColumnType("text");
b3.HasKey("PackRateConfigGameConfigRootGameConfigurationId");
b3.ToTable("GameConfigurations");
b3.WithOwner()
.HasForeignKey("PackRateConfigGameConfigRootGameConfigurationId");
});
b2.OwnsMany("SVSim.Database.Models.Config.SlotRarityWeights", "PerSlot", b3 =>
{
b3.Property<string>("PackRateConfigGameConfigRootGameConfigurationId")
.HasColumnType("text");
b3.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
b3.Property<double>("Bronze")
.HasColumnType("double precision");
b3.Property<double>("Gold")
.HasColumnType("double precision");
b3.Property<double>("Legendary")
.HasColumnType("double precision");
b3.Property<double>("Silver")
.HasColumnType("double precision");
b3.Property<string>("Slot")
.HasColumnType("text");
b3.HasKey("PackRateConfigGameConfigRootGameConfigurationId", "Id");
b3.ToTable("GameConfigurations");
b3.WithOwner()
.HasForeignKey("PackRateConfigGameConfigRootGameConfigurationId");
});
b2.Navigation("Default")
.IsRequired();
b2.Navigation("PerSlot");
});
b1.OwnsOne("SVSim.Database.Models.Config.PlayerConfig", "Player", b2 =>
{
b2.Property<string>("GameConfigRootGameConfigurationId")
.HasColumnType("text");
b2.Property<int>("MaxFriends")
.HasColumnType("integer");
b2.HasKey("GameConfigRootGameConfigurationId");
b2.ToTable("GameConfigurations");
b2.WithOwner()
.HasForeignKey("GameConfigRootGameConfigurationId");
});
b1.OwnsOne("SVSim.Database.Models.Config.RotationConfig", "Rotation", b2 =>
{
b2.Property<string>("GameConfigRootGameConfigurationId")
.HasColumnType("text");
b2.Property<int>("CardSetIdForResourceDlView")
.HasColumnType("integer");
b2.Property<bool>("IsBattlePassPeriod")
.HasColumnType("boolean");
b2.Property<bool>("IsBeginnerMission")
.HasColumnType("boolean");
b2.Property<string>("TsRotationId")
.IsRequired()
.HasColumnType("text");
b2.HasKey("GameConfigRootGameConfigurationId");
b2.ToTable("GameConfigurations");
b2.WithOwner()
.HasForeignKey("GameConfigRootGameConfigurationId");
});
b1.Navigation("Challenge")
.IsRequired();
b1.Navigation("DefaultGrants")
.IsRequired();
b1.Navigation("DefaultLoadout")
.IsRequired();
b1.Navigation("PackRates")
.IsRequired();
b1.Navigation("Player")
.IsRequired();
b1.Navigation("Rotation")
.IsRequired();
});
b.Navigation("Config")
.IsRequired();
b.HasOne("SVSim.Database.Models.EmblemEntry", "DefaultEmblem")
.WithMany()
.HasForeignKey("DefaultEmblemId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("SVSim.Database.Models.MyPageBackgroundEntry", "DefaultMyPageBackground")
.WithMany()
.HasForeignKey("DefaultMyPageBackgroundId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("SVSim.Database.Models.SleeveEntry", "DefaultSleeve")
.WithMany()
.HasForeignKey("DefaultSleeveId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("DefaultDegree");
b.Navigation("DefaultEmblem");
b.Navigation("DefaultMyPageBackground");
b.Navigation("DefaultSleeve");
});
modelBuilder.Entity("SVSim.Database.Models.LeaderSkinEntry", b =>