Add region code
This commit is contained in:
@@ -544,6 +544,15 @@ public class AppDBContext(DbContextOptions<AppDBContext> options) : DbContext(op
|
||||
|
||||
// --- Regional ---
|
||||
|
||||
modelBuilder.Entity<Region>()
|
||||
.Property(r => r.Code)
|
||||
.HasMaxLength(50);
|
||||
|
||||
modelBuilder.Entity<Region>()
|
||||
.HasIndex(r => r.Code)
|
||||
.IsUnique();
|
||||
|
||||
|
||||
modelBuilder.Entity<RegionalTarget>()
|
||||
.HasIndex(t => new { t.FK_RegionId, t.Period })
|
||||
.IsUnique();
|
||||
|
||||
Reference in New Issue
Block a user