using HopFrame.Database.Models.Entries; using Microsoft.EntityFrameworkCore; namespace HopFrame.Database; /// /// This class includes the basic database structure in order for HopFrame to work /// public abstract class HopDbContextBase : DbContext { public virtual DbSet Users { get; set; } public virtual DbSet Permissions { get; set; } public virtual DbSet Tokens { get; set; } public virtual DbSet Groups { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.Entity(); modelBuilder.Entity(); modelBuilder.Entity(); modelBuilder.Entity(); } /// /// Gets executed when a user is deleted through the IUserService from the /// HopFrame.Security package. You can override this method to also delete /// related user specific entries in the database /// /// public virtual void OnUserDelete(UserEntry user) {} }