Files
Aberwyn/Aberwyn/Data/ApplicationDbContext.cs
elias 256ce76af1
All checks were successful
continuous-integration/drone/push Build is passing
Pizza notice
2025-06-06 12:57:49 +02:00

39 lines
1.4 KiB
C#

using Aberwyn.Models;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
namespace Aberwyn.Data
{
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
builder.Entity<WeeklyMenu>().ToTable("WeeklyMenu");
}
public DbSet<BudgetPeriod> BudgetPeriods { get; set; }
public DbSet<BudgetCategory> BudgetCategories { get; set; }
public DbSet<BudgetItem> BudgetItems { get; set; }
public DbSet<PushSubscriber> PushSubscribers { get; set; }
public DbSet<PizzaOrder> PizzaOrders { get; set; }
public DbSet<AppSetting> AppSettings { get; set; }
public DbSet<TodoTask> TodoTasks { get; set; }
public DbSet<BudgetItemDefinition> BudgetItemDefinitions { get; set; }
public DbSet<BudgetCategoryDefinition> BudgetCategoryDefinitions { get; set; }
public DbSet<Meal> Meals { get; set; }
public DbSet<WeeklyMenu> WeeklyMenus { get; set; }
public DbSet<Ingredient> Ingredients { get; set; }
public DbSet<UserPreferences> UserPreferences { get; set; }
public DbSet<StoredPushSubscription> PushSubscriptions { get; set; }
}
}