Files
Finlytic/FinlyticEngine/Migrations/20260821164201_AddUserIdToEngineTrades.Designer.cs

340 lines
12 KiB
C#

// <auto-generated />
using System;
using FinlyticEngine.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 FinlyticEngine.Migrations
{
[DbContext(typeof(EngineDbContext))]
[Migration("20260821164201_AddUserIdToEngineTrades")]
partial class AddUserIdToEngineTrades
{
/// <inheritdoc />
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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("Key")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("character varying(150)");
b.Property<DateTime>("LastUpdatedUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("ServiceIdentifier")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property<string>("ValueJson")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("Key")
.IsUnique();
b.ToTable("DynamicSettings");
});
modelBuilder.Entity("FinlyticEngine.Database.Entities.EngineEvaluationSnapshotEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("AiThesisSummary")
.IsRequired()
.HasMaxLength(2048)
.HasColumnType("character varying(2048)");
b.Property<decimal>("CompositeOpportunityScore")
.HasColumnType("decimal(6,2)");
b.Property<int?>("DaysToNextEarnings")
.HasColumnType("integer");
b.Property<DateTime>("EvaluatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<decimal>("FundamentalScore")
.HasColumnType("decimal(6,2)");
b.Property<string>("Isin")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<bool>("PassedAiValidation")
.HasColumnType("boolean");
b.Property<bool>("PassedEarningsLockout")
.HasColumnType("boolean");
b.Property<decimal>("SentimentScore")
.HasColumnType("decimal(6,2)");
b.Property<string>("Symbol")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property<decimal>("TechnicalScore")
.HasColumnType("decimal(6,2)");
b.HasKey("Id");
b.HasIndex("CompositeOpportunityScore");
b.HasIndex("Isin", "EvaluatedAtUtc");
b.ToTable("engine_evaluation_snapshots");
});
modelBuilder.Entity("FinlyticEngine.Database.Entities.EngineTradeEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<decimal>("AverageBuyIn")
.HasColumnType("decimal(18,4)");
b.Property<DateTime?>("ClosedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<decimal>("CurrentPrice")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("CurrentStopLoss")
.HasColumnType("decimal(18,4)");
b.Property<string>("DerivativeIsin")
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<string>("DerivativeWkn")
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<int>("Direction")
.HasColumnType("integer");
b.Property<int>("ExecutionMode")
.HasColumnType("integer");
b.Property<string>("ExitPlan")
.IsRequired()
.HasColumnType("jsonb");
b.Property<decimal>("InitialStopLoss")
.HasColumnType("decimal(18,4)");
b.Property<int>("InstrumentType")
.HasColumnType("integer");
b.Property<DateTime>("LastUpdatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<DateTime>("OpenedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<Guid>("ProposalId")
.HasColumnType("uuid");
b.Property<decimal>("RealizedPnlEur")
.HasColumnType("decimal(18,4)");
b.Property<string>("ScoreBreakdownJson")
.IsRequired()
.HasColumnType("text");
b.Property<int>("Status")
.HasColumnType("integer");
b.Property<string>("Symbol")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property<decimal>("TakeProfit1")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("TakeProfit2")
.HasColumnType("decimal(18,4)");
b.Property<decimal?>("TakeProfitRunner")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("TotalFeesEur")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("TotalQuantity")
.HasColumnType("decimal(18,4)");
b.Property<string>("UnderlyingIsin")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<Guid>("UserId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("OpenedAtUtc");
b.HasIndex("Status", "UnderlyingIsin");
b.HasIndex("UserId", "Status");
b.ToTable("engine_trades");
});
modelBuilder.Entity("FinlyticEngine.Database.Entities.EngineTradeFillEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTime>("ExecutedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<decimal>("Fee")
.HasColumnType("decimal(18,4)");
b.Property<string>("Note")
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property<decimal>("Price")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("Quantity")
.HasColumnType("decimal(18,4)");
b.Property<Guid>("TradeId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("TradeId", "ExecutedAtUtc");
b.ToTable("engine_trade_fills");
});
modelBuilder.Entity("FinlyticEngine.Database.Entities.EngineTradeProposalEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("AiValidation")
.IsRequired()
.HasColumnType("jsonb");
b.Property<decimal>("CompositeScore")
.HasColumnType("decimal(6,2)");
b.Property<DateTime>("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<decimal>("CurrentPrice")
.HasColumnType("decimal(18,4)");
b.Property<int>("Direction")
.HasColumnType("integer");
b.Property<decimal>("EntryPrice")
.HasColumnType("decimal(18,4)");
b.Property<string>("ExitPlan")
.IsRequired()
.HasColumnType("jsonb");
b.Property<DateTime>("ExpiresAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<bool>("IsActive")
.HasColumnType("boolean");
b.Property<decimal>("QualityScore")
.HasColumnType("decimal(6,2)");
b.Property<decimal>("RiskRewardRatio")
.HasColumnType("decimal(8,2)");
b.Property<string>("SelectedDerivative")
.HasColumnType("jsonb");
b.Property<decimal>("StopLoss")
.HasColumnType("decimal(18,4)");
b.Property<string>("StrategyKey")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property<string>("Symbol")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property<decimal>("TakeProfit1")
.HasColumnType("decimal(18,4)");
b.Property<string>("UnderlyingIsin")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.HasKey("Id");
b.HasIndex("CompositeScore");
b.HasIndex("CreatedAtUtc");
b.HasIndex("UnderlyingIsin", "IsActive", "ExpiresAtUtc");
b.ToTable("engine_trade_proposals");
});
modelBuilder.Entity("FinlyticEngine.Database.Entities.EngineTradeFillEntity", b =>
{
b.HasOne("FinlyticEngine.Database.Entities.EngineTradeEntity", "Trade")
.WithMany("Fills")
.HasForeignKey("TradeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Trade");
});
modelBuilder.Entity("FinlyticEngine.Database.Entities.EngineTradeEntity", b =>
{
b.Navigation("Fills");
});
#pragma warning restore 612, 618
}
}
}