refactor: consolidate project structure by migrating authentication, identity, and shared UI components while removing legacy Web Client files.

This commit is contained in:
2026-04-28 20:23:40 +02:00
parent 131981992c
commit 10efed0369
124 changed files with 2822 additions and 2213 deletions
@@ -1,15 +1,17 @@
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using NexusReader.Domain.Entities;
namespace NexusReader.Infrastructure.Persistence;
public class AppDbContext : DbContext
public class AppDbContext : IdentityDbContext<NexusUser>
{
public AppDbContext(DbContextOptions<AppDbContext> options) : base(options)
{
}
public DbSet<SemanticKnowledgeCache> SemanticKnowledgeCache => Set<SemanticKnowledgeCache>();
public DbSet<Ebook> Ebooks => Set<Ebook>();
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
@@ -20,5 +22,13 @@ public class AppDbContext : DbContext
entity.HasKey(e => e.ContentHash);
entity.HasIndex(e => e.ContentHash).IsUnique();
});
modelBuilder.Entity<Ebook>(entity =>
{
entity.HasOne(e => e.User)
.WithMany(u => u.Ebooks)
.HasForeignKey(e => e.UserId)
.OnDelete(DeleteBehavior.Cascade);
});
}
}