Files
systemrevivalserver/data/GameDbContext.cs
T
2025-12-19 10:12:17 -05:00

43 lines
2.3 KiB
C#

using System.Security.Principal;
using Microsoft.EntityFrameworkCore;
using Server.Data.Entities;
namespace Server.Data;
public sealed class GameDbContext : DbContext
{
public GameDbContext(DbContextOptions<GameDbContext> options) : base(options) { }
public DbSet<Account> Accounts => Set<Account>();
public DbSet<Session> Sessions => Set<Session>();
public DbSet<Old_Character> Characters => Set<Old_Character>();
public DbSet<Zone> Zones => Set<Zone>();
public DbSet<ItemTemplate> ItemTemplates => Set<ItemTemplate>();
public DbSet<InventoryItem> Inventory => Set<InventoryItem>();
public DbSet<EquipmentSlot> Equipment => Set<EquipmentSlot>();
public DbSet<PlayerStats> PlayerStats => Set<PlayerStats>();
public DbSet<MatchHistory> MatchHistory => Set<MatchHistory>();
public DbSet<GameItem> GameItems => Set<GameItem>();
public DbSet<GameRecipe> GameRecipes => Set<GameRecipe>();
public DbSet<DungeonCharacter> DungeonCharacters => Set<DungeonCharacter>();
public DbSet<DungeonCharacterItem> DungeonCharacterItems => Set<DungeonCharacterItem>();
public DbSet<DungeonStashItem> DungeonStashItems => Set<DungeonStashItem>();
public DbSet<DungeonItemDefinition> DungeonItemDefinitions => Set<DungeonItemDefinition>();
public DbSet<DungeonSpellDefinition> DungeonSpellDefinitions => Set<DungeonSpellDefinition>();
public DbSet<DungeonLearnedSpell> DungeonLearnedSpells => Set<DungeonLearnedSpell>();
public DbSet<DungeonMobDefinition> DungeonMobDefinitions => Set<DungeonMobDefinition>();
public DbSet<DungeonLootTable> DungeonLootTables => Set<DungeonLootTable>();
public DbSet<DungeonLootTableEntry> DungeonLootTableEntries => Set<DungeonLootTableEntry>();
public DbSet<DungeonMobLootTable> DungeonMobLootTables => Set<DungeonMobLootTable>();
public DbSet<DungeonBeltItem> DungeonBeltItems => Set<DungeonBeltItem>();
public DbSet<DeathChest> DeathChests => Set<DeathChest>();
public DbSet<DeathChestItem> DeathChestItems => Set<DeathChestItem>();
public DbSet<DungeonPersistence> DungeonInstances => Set<DungeonPersistence>();
public DbSet<ClientAsset> ClientAssets => Set<ClientAsset>();
protected override void OnModelCreating(ModelBuilder b)
{
b.ApplyConfigurationsFromAssembly(typeof(GameDbContext).Assembly);
}
}