Added the initial framework for the new Money system.

Includes
- 5 new tables: Gamblers, Transactions, Wagers, Exclusions, Perks
- Still heavily WIP and not ready to be enabled, no games present and a lot of missing functionality
- For now it's completely disabled until it's ready to be used.
This commit is contained in:
barelyprofessional
2025-08-20 14:59:09 -05:00
parent 8d100b013b
commit 6ca1cf055c
15 changed files with 1831 additions and 14 deletions

View File

@@ -69,6 +69,103 @@ namespace KfChatDotNetBot.Migrations
b.ToTable("ChipsggBets");
});
modelBuilder.Entity("KfChatDotNetBot.Models.DbModels.GamblerDbModel", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<decimal>("Balance")
.HasColumnType("TEXT");
b.Property<DateTimeOffset>("Created")
.HasColumnType("TEXT");
b.Property<decimal>("NextVipLevelWagerRequirement")
.HasColumnType("TEXT");
b.Property<string>("RandomSeed")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<int>("State")
.HasColumnType("INTEGER");
b.Property<decimal>("TotalWagered")
.HasColumnType("TEXT");
b.Property<int>("UserId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("Gamblers");
});
modelBuilder.Entity("KfChatDotNetBot.Models.DbModels.GamblerExclusionDbModel", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<DateTimeOffset>("Created")
.HasColumnType("TEXT");
b.Property<DateTimeOffset>("Expires")
.HasColumnType("TEXT");
b.Property<int>("GamblerId")
.HasColumnType("INTEGER");
b.Property<int>("Source")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("GamblerId");
b.ToTable("Exclusions");
});
modelBuilder.Entity("KfChatDotNetBot.Models.DbModels.GamblerPerkDbModel", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("GamblerId")
.HasColumnType("INTEGER");
b.Property<string>("Metadata")
.HasColumnType("TEXT");
b.Property<decimal?>("Payout")
.HasColumnType("TEXT");
b.Property<string>("PerkName")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<int?>("PerkTier")
.HasColumnType("INTEGER");
b.Property<int>("PerkType")
.HasColumnType("INTEGER");
b.Property<DateTimeOffset>("Time")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("GamblerId");
b.ToTable("Perks");
});
modelBuilder.Entity("KfChatDotNetBot.Models.DbModels.HowlggBetsDbModel", b =>
{
b.Property<int>("Id")
@@ -273,6 +370,45 @@ namespace KfChatDotNetBot.Migrations
b.ToTable("Streams");
});
modelBuilder.Entity("KfChatDotNetBot.Models.DbModels.TransactionDbModel", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Comment")
.HasColumnType("TEXT");
b.Property<decimal>("Effect")
.HasColumnType("TEXT");
b.Property<int>("EventSource")
.HasColumnType("INTEGER");
b.Property<int?>("FromId")
.HasColumnType("INTEGER");
b.Property<int>("GamblerId")
.HasColumnType("INTEGER");
b.Property<decimal>("NewBalance")
.HasColumnType("TEXT");
b.Property<DateTimeOffset>("Time")
.HasColumnType("TEXT");
b.Property<long>("TimeUnixEpochSeconds")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("FromId");
b.HasIndex("GamblerId");
b.ToTable("Transactions");
});
modelBuilder.Entity("KfChatDotNetBot.Models.DbModels.TwitchViewCountDbModel", b =>
{
b.Property<int>("Id")
@@ -346,6 +482,79 @@ namespace KfChatDotNetBot.Migrations
b.ToTable("UsersWhoWere");
});
modelBuilder.Entity("KfChatDotNetBot.Models.DbModels.WagerDbModel", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("GamblerId")
.HasColumnType("INTEGER");
b.Property<int>("Game")
.HasColumnType("INTEGER");
b.Property<string>("GameMeta")
.HasColumnType("TEXT");
b.Property<bool>("IsComplete")
.HasColumnType("INTEGER");
b.Property<decimal>("Multiplier")
.HasColumnType("TEXT");
b.Property<DateTimeOffset>("Time")
.HasColumnType("TEXT");
b.Property<long>("TimeUnixEpochSeconds")
.HasColumnType("INTEGER");
b.Property<decimal>("WagerAmount")
.HasColumnType("TEXT");
b.Property<decimal>("WagerEffect")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("GamblerId");
b.ToTable("Wagers");
});
modelBuilder.Entity("KfChatDotNetBot.Models.DbModels.GamblerDbModel", b =>
{
b.HasOne("KfChatDotNetBot.Models.DbModels.UserDbModel", "User")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("User");
});
modelBuilder.Entity("KfChatDotNetBot.Models.DbModels.GamblerExclusionDbModel", b =>
{
b.HasOne("KfChatDotNetBot.Models.DbModels.GamblerDbModel", "Gambler")
.WithMany()
.HasForeignKey("GamblerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Gambler");
});
modelBuilder.Entity("KfChatDotNetBot.Models.DbModels.GamblerPerkDbModel", b =>
{
b.HasOne("KfChatDotNetBot.Models.DbModels.GamblerDbModel", "Gambler")
.WithMany()
.HasForeignKey("GamblerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Gambler");
});
modelBuilder.Entity("KfChatDotNetBot.Models.DbModels.JuicerDbModel", b =>
{
b.HasOne("KfChatDotNetBot.Models.DbModels.UserDbModel", "User")
@@ -377,6 +586,23 @@ namespace KfChatDotNetBot.Migrations
b.Navigation("User");
});
modelBuilder.Entity("KfChatDotNetBot.Models.DbModels.TransactionDbModel", b =>
{
b.HasOne("KfChatDotNetBot.Models.DbModels.GamblerDbModel", "From")
.WithMany()
.HasForeignKey("FromId");
b.HasOne("KfChatDotNetBot.Models.DbModels.GamblerDbModel", "Gambler")
.WithMany()
.HasForeignKey("GamblerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("From");
b.Navigation("Gambler");
});
modelBuilder.Entity("KfChatDotNetBot.Models.DbModels.UserWhoWasDbModel", b =>
{
b.HasOne("KfChatDotNetBot.Models.DbModels.UserDbModel", "User")
@@ -387,6 +613,17 @@ namespace KfChatDotNetBot.Migrations
b.Navigation("User");
});
modelBuilder.Entity("KfChatDotNetBot.Models.DbModels.WagerDbModel", b =>
{
b.HasOne("KfChatDotNetBot.Models.DbModels.GamblerDbModel", "Gambler")
.WithMany()
.HasForeignKey("GamblerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Gambler");
});
#pragma warning restore 612, 618
}
}