Files
KfChatDotNet/KfChatDotNetBot/ApplicationDbContext.cs
barelyprofessional 7981f57a34 - Moved the Kasino shop models to their own file
- Added investments as a derivative of assets
- Added profile state flags which can retain basic states like IsSponsored
- Added profile state data using EF Core's JSON functionality so it should automatically serialize / deserialize the accompanying model for convenience (OnModelCreating code commented out due to the models not yet having a DbSet as I won't bake them in until KasinoShop is ready)
2026-04-26 20:39:49 -05:00

37 lines
1.6 KiB
C#

using KfChatDotNetBot.Models.DbModels;
using Microsoft.EntityFrameworkCore;
namespace KfChatDotNetBot;
public class ApplicationDbContext : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder builder)
{
builder.UseSqlite("Data Source=db.sqlite");
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
//modelBuilder.Entity<KasinoShopProfileDbModel>()
// .OwnsOne(p => p.StateData, b => b.ToJson());
}
public DbSet<UserDbModel> Users { get; set; }
public DbSet<JuicerDbModel> Juicers { get; set; }
public DbSet<SettingDbModel> Settings { get; set; }
public DbSet<HowlggBetsDbModel> HowlggBets { get; set; }
public DbSet<RainbetBetsDbModel> RainbetBets { get; set; }
public DbSet<TwitchViewCountDbModel> TwitchViewCounts { get; set; }
public DbSet<ChipsggBetDbModel> ChipsggBets { get; set; }
public DbSet<ImageDbModel> Images { get; set; }
public DbSet<UserWhoWasDbModel> UsersWhoWere { get; set; }
// public DbSet<PocketWatchAddressDbModel> PocketWatchAddresses { get; set; }
// public DbSet<PocketWatchTransactionDbModel> PocketWatchTransactions { get; set; }
public DbSet<MomDbModel> Moms { get; set; }
public DbSet<StreamDbModel> Streams { get; set; }
public DbSet<GamblerDbModel> Gamblers { get; set; }
public DbSet<TransactionDbModel> Transactions { get; set; }
public DbSet<WagerDbModel> Wagers { get; set; }
public DbSet<GamblerExclusionDbModel> Exclusions { get; set; }
public DbSet<GamblerPerkDbModel> Perks { get; set; }
}