Add Versionning for bundle backtest request
This commit is contained in:
@@ -199,6 +199,7 @@ public class ManagingDbContext : DbContext
|
||||
entity.Property(e => e.RequestId).IsRequired().HasMaxLength(255);
|
||||
entity.Property(e => e.UserId);
|
||||
entity.Property(e => e.Name).IsRequired().HasMaxLength(255);
|
||||
entity.Property(e => e.Version).IsRequired().HasDefaultValue(1);
|
||||
entity.Property(e => e.Status)
|
||||
.IsRequired()
|
||||
.HasConversion<string>(); // Store enum as string
|
||||
@@ -224,6 +225,9 @@ public class ManagingDbContext : DbContext
|
||||
|
||||
// Composite index for user queries ordered by creation date
|
||||
entity.HasIndex(e => new { e.UserId, e.CreatedAt });
|
||||
|
||||
// Composite index for user queries by name and version
|
||||
entity.HasIndex(e => new { e.UserId, e.Name, e.Version });
|
||||
});
|
||||
|
||||
// Configure Scenario entity
|
||||
|
||||
Reference in New Issue
Block a user