// using System; using FinlyticTrades.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 FinlyticTrades.Migrations { [DbContext(typeof(TradesDbContext))] [Migration("20260803170643_AddMultiUserTradeExecution")] partial class AddMultiUserTradeExecution { /// 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("FinlyticTrades.Entities.TradeEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("ActualEntryPrice") .HasColumnType("decimal(18,4)"); b.Property("AnalysisId") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)"); b.Property("CloseReason") .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("ClosedAt") .HasColumnType("timestamp with time zone"); b.Property("CompanyName") .IsRequired() .HasMaxLength(150) .HasColumnType("character varying(150)"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("EntryFee") .HasColumnType("decimal(18,4)"); b.Property("EntryPrice") .HasColumnType("decimal(18,4)"); b.Property("EntryZoneMax") .HasColumnType("decimal(18,4)"); b.Property("EntryZoneMin") .HasColumnType("decimal(18,4)"); b.Property("EventId") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)"); b.Property("ExecutionTimestamp") .HasColumnType("timestamp with time zone"); b.Property("ExitFee") .HasColumnType("decimal(18,4)"); b.Property("FundamentalRationale") .IsRequired() .HasColumnType("text"); b.Property("InstrumentType") .IsRequired() .HasMaxLength(30) .HasColumnType("character varying(30)"); b.Property("IsGlobalProposal") .HasColumnType("boolean"); b.Property("IsRecurring") .HasColumnType("boolean"); b.Property("IsWin") .HasColumnType("boolean"); b.Property("Isin") .IsRequired() .HasMaxLength(30) .HasColumnType("character varying(30)"); b.Property("KnockoutThreshold") .HasColumnType("decimal(18,4)"); b.Property("LeverageUsed") .HasColumnType("decimal(18,4)"); b.Property("MaxLeverage") .HasColumnType("decimal(18,4)"); b.Property("PnlAbsolute") .HasColumnType("decimal(18,4)"); b.Property("PnlPercent") .HasColumnType("decimal(18,4)"); b.Property("PositionSize") .HasColumnType("decimal(18,4)"); b.Property("Quantity") .HasColumnType("decimal(18,4)"); b.Property("Reasoning") .IsRequired() .HasColumnType("text"); b.Property("RiskRewardRatio") .HasColumnType("decimal(18,4)"); b.Property("RiskTolerance") .IsRequired() .HasMaxLength(30) .HasColumnType("character varying(30)"); b.Property("RiskWarning") .IsRequired() .HasColumnType("text"); b.Property("Sector") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("SignalType") .IsRequired() .HasMaxLength(10) .HasColumnType("character varying(10)"); b.Property("Status") .HasColumnType("integer"); b.Property("StopLoss") .HasColumnType("decimal(18,4)"); b.Property("Symbol") .IsRequired() .HasMaxLength(30) .HasColumnType("character varying(30)"); b.Property("TakeProfit") .HasColumnType("decimal(18,4)"); b.Property("TakeProfitTargets") .HasColumnType("text"); b.Property("TechnicalRationale") .IsRequired() .HasColumnType("text"); b.Property("Timeframe") .IsRequired() .HasMaxLength(20) .HasColumnType("character varying(20)"); b.Property("TradeId") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)"); b.Property("TtlMinutes") .HasColumnType("integer"); b.Property("UserExitPrice") .HasColumnType("decimal(18,4)"); b.Property("UserExitTimestamp") .HasColumnType("timestamp with time zone"); b.Property("UserId") .HasMaxLength(100) .HasColumnType("character varying(100)"); b.Property("VixRegime") .HasColumnType("integer"); b.Property("VixValue") .HasColumnType("decimal(18,4)"); b.Property("WinRate") .HasColumnType("double precision"); b.HasKey("Id"); b.HasIndex("AnalysisId"); b.HasIndex("CreatedAt"); b.HasIndex("EventId"); b.HasIndex("Isin"); b.HasIndex("Sector"); b.HasIndex("Status"); b.HasIndex("TradeId") .IsUnique(); b.ToTable("trades"); }); modelBuilder.Entity("FinlyticTrades.Entities.TradeHourlyUpdateEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CurrentPrice") .HasColumnType("decimal(18,4)"); b.Property("Reasoning") .IsRequired() .HasColumnType("text"); b.Property("Recommendation") .IsRequired() .HasMaxLength(30) .HasColumnType("character varying(30)"); b.Property("SuggestedStopLoss") .HasColumnType("decimal(18,4)"); b.Property("SuggestedTakeProfit") .HasColumnType("decimal(18,4)"); b.Property("Timestamp") .HasColumnType("timestamp with time zone"); b.Property("TradeId") .HasColumnType("uuid"); b.Property("VixValue") .HasColumnType("decimal(18,4)"); b.HasKey("Id"); b.HasIndex("Timestamp"); b.HasIndex("TradeId"); b.ToTable("trade_hourly_updates"); }); modelBuilder.Entity("FinlyticTrades.Entities.TradesSettingsEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("AtrStopLossMultiplier") .HasColumnType("double precision"); b.Property("MaxOpenPositions") .HasColumnType("integer"); b.Property("RiskPerTradePercentage") .HasColumnType("double precision"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone"); b.HasKey("Id"); b.ToTable("Settings"); }); modelBuilder.Entity("FinlyticTrades.Entities.TradeHourlyUpdateEntity", b => { b.HasOne("FinlyticTrades.Entities.TradeEntity", "Trade") .WithMany("HourlyUpdates") .HasForeignKey("TradeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Trade"); }); modelBuilder.Entity("FinlyticTrades.Entities.TradeEntity", b => { b.Navigation("HourlyUpdates"); }); #pragma warning restore 612, 618 } } }