using Microsoft.EntityFrameworkCore; using LCU.Library.Internal.DispatcherModels.Entities; namespace LCU.Api.Internal.DispatcherLib.Persistence; public class AppDbContext : DbContext { public DbSet Jobs { get; set; } public DbSet JobErrorRecipients { get; set; } public DbSet JobTags { get; set; } public DbSet Tags { get; set; } public DbSet WorkItems { get; set; } public DbSet WorkItemExecutions { get; set; } public DbSet ExecutionMessages { get; set; } public DbSet CleanUpJobSettings { get; set; } public DbSet CleanUpJobTags { get; set; } public AppDbContext(DbContextOptions options) : base(options) { } protected override void OnModelCreating(ModelBuilder builder) { base.OnModelCreating(builder); builder.Entity().ToTable("Job"); builder.Entity().ToTable("JobErrorRecipient"); builder.Entity().ToTable("JobTag"); builder.Entity().ToTable("Tag"); builder.Entity().ToTable("WorkItem"); builder.Entity().ToTable("WorkItemExecution"); builder.Entity().ToTable("ExecutionMessage"); builder.Entity().ToTable("CleanUpJobSetting"); builder.Entity().ToTable("CleanUpJobTag"); } }