2026-03-03 14:32:21 +01:00
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using WorkClub.Domain.Entities;
|
|
|
|
|
|
|
|
|
|
namespace WorkClub.Infrastructure.Data;
|
|
|
|
|
|
|
|
|
|
public class AppDbContext : DbContext
|
|
|
|
|
{
|
|
|
|
|
public AppDbContext(DbContextOptions<AppDbContext> options) : base(options)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public DbSet<Club> Clubs => Set<Club>();
|
|
|
|
|
public DbSet<Member> Members => Set<Member>();
|
|
|
|
|
public DbSet<WorkItem> WorkItems => Set<WorkItem>();
|
|
|
|
|
public DbSet<Shift> Shifts => Set<Shift>();
|
|
|
|
|
public DbSet<ShiftSignup> ShiftSignups => Set<ShiftSignup>();
|
|
|
|
|
|
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
|
|
|
|
base.OnModelCreating(modelBuilder);
|
2026-03-05 11:07:19 +01:00
|
|
|
|
2026-03-03 14:32:21 +01:00
|
|
|
modelBuilder.ApplyConfigurationsFromAssembly(typeof(AppDbContext).Assembly);
|
|
|
|
|
}
|
|
|
|
|
}
|