Enhance documentation with new features: added dark/light/system theme support, instructions page, and application catalog. Updated API and domain model for app management and automatic migrations on startup. Improved frontend structure with new routes and features for user instructions and app management.
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PnvPanel.Application.Common.Interfaces;
|
||||
using PnvPanel.Domain.Activation;
|
||||
using PnvPanel.Domain.Apps;
|
||||
using PnvPanel.Domain.Configs;
|
||||
using PnvPanel.Domain.Inbounds;
|
||||
using PnvPanel.Domain.Nodes;
|
||||
using PnvPanel.Infrastructure.Identity;
|
||||
|
||||
namespace PnvPanel.Infrastructure.Persistence;
|
||||
|
||||
/// <summary>
|
||||
/// Корневой DbContext приложения: Identity-схема (пользователи/роли) + сущности домена
|
||||
/// (добавляются по мере реализации фич, см. docs/roadmap.md).
|
||||
/// </summary>
|
||||
public class AppDbContext(DbContextOptions<AppDbContext> options)
|
||||
: IdentityDbContext<AppUser, AppRole, Guid>(options), IAppDbContext
|
||||
{
|
||||
public DbSet<RefreshToken> RefreshTokens => Set<RefreshToken>();
|
||||
|
||||
public DbSet<ActivationRequest> ActivationRequests => Set<ActivationRequest>();
|
||||
|
||||
public DbSet<Node> Nodes => Set<Node>();
|
||||
|
||||
public DbSet<Inbound> Inbounds => Set<Inbound>();
|
||||
|
||||
public DbSet<VpnConfig> VpnConfigs => Set<VpnConfig>();
|
||||
|
||||
public DbSet<ClientApp> ClientApps => Set<ClientApp>();
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
modelBuilder.ApplyConfigurationsFromAssembly(typeof(AppDbContext).Assembly);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user