feat: Implement a customizable dashboard with user preferences and a dynamic widget system.
This commit is contained in:
@@ -34,6 +34,7 @@ public class ZentralDbContext : DbContext
|
||||
public DbSet<EventoDegustazione> EventiDegustazioni => Set<EventoDegustazione>();
|
||||
public DbSet<Configurazione> Configurazioni => Set<Configurazione>();
|
||||
public DbSet<Utente> Utenti => Set<Utente>();
|
||||
public DbSet<UserDashboardPreference> UserDashboardPreferences => Set<UserDashboardPreference>();
|
||||
|
||||
// Report entities
|
||||
public DbSet<ReportTemplate> ReportTemplates => Set<ReportTemplate>();
|
||||
@@ -311,6 +312,16 @@ public class ZentralDbContext : DbContext
|
||||
entity.HasIndex(e => e.Username).IsUnique();
|
||||
});
|
||||
|
||||
// UserDashboardPreference
|
||||
modelBuilder.Entity<UserDashboardPreference>(entity =>
|
||||
{
|
||||
entity.HasIndex(e => e.UtenteId).IsUnique();
|
||||
entity.HasOne(e => e.Utente)
|
||||
.WithOne()
|
||||
.HasForeignKey<UserDashboardPreference>(e => e.UtenteId)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
// ReportTemplate
|
||||
modelBuilder.Entity<ReportTemplate>(entity =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user