Add Versionning for bundle backtest request

This commit is contained in:
2025-10-23 13:37:53 +07:00
parent 6bfefc91c8
commit 92c28367cf
13 changed files with 1655 additions and 8 deletions

View File

@@ -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