feat: implement core radius service and database schema for guest access management

This commit is contained in:
Tygozwolle
2026-07-23 11:12:10 +02:00
commit f186708943
30 changed files with 2594 additions and 0 deletions
+31
View File
@@ -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");
}
}