//
using System;
using FinlyticTechnicals.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 FinlyticTechnicals.Migrations
{
[DbContext(typeof(TechnicalAnalysisDbContext))]
[Migration("20260822090549_AddRegimeToTechnicalSetups")]
partial class AddRegimeToTechnicalSetups
{
///
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("FinlyticTechnicals.Entities.FtaCandleEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("Ask")
.HasColumnType("decimal(18,4)");
b.Property("Bid")
.HasColumnType("decimal(18,4)");
b.Property("Close")
.HasColumnType("decimal(18,4)");
b.Property("High")
.HasColumnType("decimal(18,4)");
b.Property("Isin")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property("Low")
.HasColumnType("decimal(18,4)");
b.Property("Open")
.HasColumnType("decimal(18,4)");
b.Property("Symbol")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property("Timeframe")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property("TimestampUtc")
.HasColumnType("timestamp with time zone");
b.Property("Volume")
.HasColumnType("bigint");
b.HasKey("Id");
b.HasIndex("TimestampUtc");
b.HasIndex("Isin", "Timeframe", "TimestampUtc");
b.ToTable("fta_candles");
});
modelBuilder.Entity("FinlyticTechnicals.Entities.FtaDetectedPatternEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("Bias")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property("Category")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property("Description")
.IsRequired()
.HasColumnType("text");
b.Property("DetectedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("ExtraData")
.HasColumnType("jsonb");
b.Property("InvalidationLevel")
.HasColumnType("decimal(18,4)");
b.Property("Isin")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property("KeyPriceLevel")
.HasColumnType("decimal(18,4)");
b.Property("LowerBoundary")
.HasColumnType("decimal(18,4)");
b.Property("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property("PatternType")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property("QualityScore")
.HasColumnType("decimal(6,2)");
b.Property("Timeframe")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property("UpperBoundary")
.HasColumnType("decimal(18,4)");
b.HasKey("Id");
b.HasIndex("PatternType");
b.HasIndex("QualityScore");
b.HasIndex("Isin", "DetectedAtUtc");
b.ToTable("fta_detected_patterns");
});
modelBuilder.Entity("FinlyticTechnicals.Entities.FtaMonitoredUniverseAssetEntity", b =>
{
b.Property("Isin")
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property("AddedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("ExpiresAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("Priority")
.HasColumnType("integer");
b.Property("Source")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property("Symbol")
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.HasKey("Isin");
b.HasIndex("ExpiresAtUtc");
b.HasIndex("Source");
b.ToTable("fta_monitored_universe_assets");
});
modelBuilder.Entity("FinlyticTechnicals.Entities.FtaTechnicalSetupEntity", b =>
{
b.Property("SetupId")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("CurrentAtr")
.HasColumnType("decimal(18,4)");
b.Property("CurrentPrice")
.HasColumnType("decimal(18,4)");
b.Property("Direction")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property("EntryPrice")
.HasColumnType("decimal(18,4)");
b.Property("EstimatedRiskRewardRatio")
.HasColumnType("decimal(8,2)");
b.Property("ExitPlan")
.IsRequired()
.HasColumnType("jsonb");
b.Property("ExpiresAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("IndicatorSnapshot")
.IsRequired()
.HasColumnType("jsonb");
b.Property("InvalidationPrice")
.HasColumnType("decimal(18,4)");
b.Property("IsActive")
.HasColumnType("boolean");
b.Property("IsTopPick")
.HasColumnType("boolean");
b.Property("Isin")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property("QualityScore")
.HasColumnType("decimal(6,2)");
b.Property("Rating")
.IsRequired()
.HasMaxLength(5)
.HasColumnType("character varying(5)");
b.Property("Regime")
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property("StrategyKey")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property("StrategyName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property("Symbol")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property("TechnicalRationale")
.IsRequired()
.HasColumnType("text");
b.Property("Timeframe")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property("TriggeringPatterns")
.IsRequired()
.HasColumnType("jsonb");
b.Property("UniverseEnteredAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("UniverseSource")
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.HasKey("SetupId");
b.HasIndex("CreatedAtUtc");
b.HasIndex("IsTopPick");
b.HasIndex("QualityScore");
b.HasIndex("IsActive", "IsTopPick", "QualityScore");
b.HasIndex("Isin", "IsActive", "ExpiresAtUtc");
b.ToTable("fta_technical_setups");
});
#pragma warning restore 612, 618
}
}
}