27 lines
1.0 KiB
C#
27 lines
1.0 KiB
C#
using System.Security.Principal;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
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<Character> Characters => Set<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>();
|
|
|
|
protected override void OnModelCreating(ModelBuilder b)
|
|
{
|
|
b.ApplyConfigurationsFromAssembly(typeof(GameDbContext).Assembly);
|
|
}
|
|
}
|