feat: implement core radius service and database schema for guest access management
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using radiuscontroller.Models;
|
||||
|
||||
namespace radiuscontroller.Data;
|
||||
|
||||
public class RadiusDbContext : DbContext
|
||||
{
|
||||
public RadiusDbContext(DbContextOptions<RadiusDbContext> options)
|
||||
: base(options)
|
||||
{
|
||||
}
|
||||
|
||||
public DbSet<RadCheck> RadCheck { get; set; } = null!;
|
||||
public DbSet<RadReply> RadReply { get; set; } = null!;
|
||||
public DbSet<RadAcct> RadAcct { get; set; } = null!;
|
||||
public DbSet<GuestProfile> GuestProfiles { get; set; } = null!;
|
||||
public DbSet<AdminUser> AdminUsers { get; set; } = null!;
|
||||
public DbSet<SystemSetting> SystemSettings { get; set; } = null!;
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
|
||||
modelBuilder.Entity<RadCheck>().ToTable("radcheck");
|
||||
modelBuilder.Entity<RadReply>().ToTable("radreply");
|
||||
modelBuilder.Entity<RadAcct>().ToTable("radacct");
|
||||
modelBuilder.Entity<GuestProfile>().ToTable("guest_profiles");
|
||||
modelBuilder.Entity<AdminUser>().ToTable("admin_users");
|
||||
modelBuilder.Entity<SystemSetting>().ToTable("system_settings");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user