feat(dashboard): add owner-scoped layouts with atomic revisions

This commit is contained in:
cesnimda
2026-10-21 20:59:58 +02:00
parent 421f902d21
commit 5edbe59692
11 changed files with 539 additions and 0 deletions
+9
View File
@@ -101,6 +101,15 @@ namespace JobTrackerApi.Data
.Property(x => x.UiLanguage)
.HasMaxLength(16);
modelBuilder.Entity<ApplicationUser>()
.Property(x => x.DashboardLayoutRevision)
.HasDefaultValue(0L);
// Layout writes use the revision-guarded endpoint; Identity's whole-user update must not replay stale values.
modelBuilder.Entity<ApplicationUser>().Property(x => x.DashboardLayoutJson)
.Metadata.SetAfterSaveBehavior(Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior.Ignore);
modelBuilder.Entity<ApplicationUser>().Property(x => x.DashboardLayoutRevision)
.Metadata.SetAfterSaveBehavior(Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior.Ignore);
modelBuilder.Entity<AccountDeletionRequest>().Property(x => x.OwnerUserId).HasMaxLength(255);
modelBuilder.Entity<AccountDeletionRequest>().Property(x => x.OwnerKey).HasMaxLength(64);
modelBuilder.Entity<AccountDeletionRequest>().Property(x => x.RequestedByUserId).HasMaxLength(255);