// using System; using FinlyticSimulation.Database; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace FinlyticSimulation.Migrations { [DbContext(typeof(SimulationDbContext))] [Migration("20260819191418_InitialSimulationMigration")] partial class InitialSimulationMigration { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "10.0.9") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("FinlyticCore.Entities.Settings.SettingEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Key") .IsRequired() .HasMaxLength(150) .HasColumnType("character varying(150)"); b.Property("LastUpdatedUtc") .HasColumnType("timestamp with time zone"); b.Property("ServiceIdentifier") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)"); b.Property("ValueJson") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("Key") .IsUnique(); b.ToTable("DynamicSettings"); }); modelBuilder.Entity("FinlyticSimulation.Database.Entities.SimulationRunEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAtUtc") .HasColumnType("timestamp with time zone"); b.Property("EndDateUtc") .HasColumnType("timestamp with time zone"); b.Property("ExpectancyEur") .HasColumnType("decimal(18,4)"); b.Property("Isin") .IsRequired() .HasMaxLength(20) .HasColumnType("character varying(20)"); b.Property("LosingTrades") .HasColumnType("integer"); b.Property("MaxDrawdownPercent") .HasColumnType("decimal(6,2)"); b.Property("ProfitFactor") .HasColumnType("decimal(8,4)"); b.Property("ReportJson") .IsRequired() .HasColumnType("jsonb"); b.Property("SharpeRatio") .HasColumnType("decimal(8,4)"); b.Property("StartDateUtc") .HasColumnType("timestamp with time zone"); b.Property("StartingCapital") .HasColumnType("decimal(18,4)"); b.Property("StrategyKey") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("Symbol") .IsRequired() .HasMaxLength(30) .HasColumnType("character varying(30)"); b.Property("Timeframe") .IsRequired() .HasMaxLength(10) .HasColumnType("character varying(10)"); b.Property("TotalReturnPercent") .HasColumnType("decimal(8,2)"); b.Property("TotalTrades") .HasColumnType("integer"); b.Property("WinRatePercent") .HasColumnType("decimal(6,2)"); b.Property("WinningTrades") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("CreatedAtUtc"); b.HasIndex("Isin", "StrategyKey", "Timeframe"); b.ToTable("simulation_runs"); }); modelBuilder.Entity("FinlyticSimulation.Database.Entities.SimulationStrategyMatrixEntity", b => { b.Property("Isin") .HasMaxLength(20) .HasColumnType("character varying(20)"); b.Property("StrategyKey") .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("Timeframe") .HasMaxLength(10) .HasColumnType("character varying(10)"); b.Property("IsApproved") .HasColumnType("boolean"); b.Property("LastBacktestRunId") .HasColumnType("uuid"); b.Property("MaxDrawdownPercent") .HasColumnType("decimal(6,2)"); b.Property("ProfitFactor") .HasColumnType("decimal(8,4)"); b.Property("RecommendedAction") .IsRequired() .HasMaxLength(30) .HasColumnType("character varying(30)"); b.Property("ReliabilityScore") .HasColumnType("decimal(5,2)"); b.Property("SampleTradesCount") .HasColumnType("integer"); b.Property("UpdatedAtUtc") .HasColumnType("timestamp with time zone"); b.Property("WinRatePercent") .HasColumnType("decimal(6,2)"); b.HasKey("Isin", "StrategyKey", "Timeframe"); b.HasIndex("ReliabilityScore"); b.HasIndex("Isin", "IsApproved"); b.ToTable("simulation_strategy_matrix"); }); #pragma warning restore 612, 618 } } }