feat(technicals): add technical analysis microservice with indicator engines, pattern detectors, and strategies

This commit is contained in:
2026-08-24 21:36:05 +02:00
parent 12e7b57b16
commit f43ce2b7e9
36 changed files with 6792 additions and 0 deletions
@@ -0,0 +1,289 @@
// <auto-generated />
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("20260819182054_Init")]
partial class Init
{
/// <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("FinlyticTechnicals.Entities.FtaCandleEntity", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<decimal?>("Ask")
.HasColumnType("decimal(18,4)");
b.Property<decimal?>("Bid")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("Close")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("High")
.HasColumnType("decimal(18,4)");
b.Property<string>("Isin")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<decimal>("Low")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("Open")
.HasColumnType("decimal(18,4)");
b.Property<string>("Symbol")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property<string>("Timeframe")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property<DateTime>("TimestampUtc")
.HasColumnType("timestamp with time zone");
b.Property<long>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("Bias")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<string>("Category")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime>("DetectedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("ExtraData")
.HasColumnType("jsonb");
b.Property<decimal>("InvalidationLevel")
.HasColumnType("decimal(18,4)");
b.Property<string>("Isin")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<decimal>("KeyPriceLevel")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("LowerBoundary")
.HasColumnType("decimal(18,4)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property<string>("PatternType")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property<decimal>("QualityScore")
.HasColumnType("decimal(6,2)");
b.Property<string>("Timeframe")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property<decimal>("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.FtaTechnicalSetupEntity", b =>
{
b.Property<Guid>("SetupId")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTime>("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<decimal>("CurrentAtr")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("CurrentPrice")
.HasColumnType("decimal(18,4)");
b.Property<string>("Direction")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property<decimal>("EntryPrice")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("EstimatedRiskRewardRatio")
.HasColumnType("decimal(8,2)");
b.Property<string>("ExitPlan")
.IsRequired()
.HasColumnType("jsonb");
b.Property<DateTime>("ExpiresAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("IndicatorSnapshot")
.IsRequired()
.HasColumnType("jsonb");
b.Property<decimal>("InvalidationPrice")
.HasColumnType("decimal(18,4)");
b.Property<bool>("IsActive")
.HasColumnType("boolean");
b.Property<bool>("IsTopPick")
.HasColumnType("boolean");
b.Property<string>("Isin")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<decimal>("QualityScore")
.HasColumnType("decimal(6,2)");
b.Property<string>("Rating")
.IsRequired()
.HasMaxLength(5)
.HasColumnType("character varying(5)");
b.Property<string>("StrategyKey")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property<string>("StrategyName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property<string>("Symbol")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property<string>("TechnicalRationale")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Timeframe")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property<string>("TriggeringPatterns")
.IsRequired()
.HasColumnType("jsonb");
b.HasKey("SetupId");
b.HasIndex("CreatedAtUtc");
b.HasIndex("IsTopPick");
b.HasIndex("QualityScore");
b.HasIndex("Isin", "IsActive", "ExpiresAtUtc");
b.ToTable("fta_technical_setups");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,178 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace FinlyticTechnicals.Migrations
{
/// <inheritdoc />
public partial class Init : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "DynamicSettings",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
Key = table.Column<string>(type: "character varying(150)", maxLength: 150, nullable: false),
ValueJson = table.Column<string>(type: "text", nullable: false),
ServiceIdentifier = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
LastUpdatedUtc = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_DynamicSettings", x => x.Id);
});
migrationBuilder.CreateTable(
name: "fta_candles",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Isin = table.Column<string>(type: "character varying(20)", maxLength: 20, nullable: false),
Symbol = table.Column<string>(type: "character varying(30)", maxLength: 30, nullable: false),
Timeframe = table.Column<string>(type: "character varying(10)", maxLength: 10, nullable: false),
TimestampUtc = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
Open = table.Column<decimal>(type: "numeric(18,4)", nullable: false),
High = table.Column<decimal>(type: "numeric(18,4)", nullable: false),
Low = table.Column<decimal>(type: "numeric(18,4)", nullable: false),
Close = table.Column<decimal>(type: "numeric(18,4)", nullable: false),
Volume = table.Column<long>(type: "bigint", nullable: false),
Bid = table.Column<decimal>(type: "numeric(18,4)", nullable: true),
Ask = table.Column<decimal>(type: "numeric(18,4)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_fta_candles", x => x.Id);
});
migrationBuilder.CreateTable(
name: "fta_detected_patterns",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
Isin = table.Column<string>(type: "character varying(20)", maxLength: 20, nullable: false),
Timeframe = table.Column<string>(type: "character varying(10)", maxLength: 10, nullable: false),
PatternType = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
Category = table.Column<string>(type: "character varying(30)", maxLength: 30, nullable: false),
Bias = table.Column<string>(type: "character varying(20)", maxLength: 20, nullable: false),
Name = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
KeyPriceLevel = table.Column<decimal>(type: "numeric(18,4)", nullable: false),
UpperBoundary = table.Column<decimal>(type: "numeric(18,4)", nullable: false),
LowerBoundary = table.Column<decimal>(type: "numeric(18,4)", nullable: false),
InvalidationLevel = table.Column<decimal>(type: "numeric(18,4)", nullable: false),
QualityScore = table.Column<decimal>(type: "numeric(6,2)", nullable: false),
Description = table.Column<string>(type: "text", nullable: false),
ExtraData = table.Column<string>(type: "jsonb", nullable: true),
DetectedAtUtc = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_fta_detected_patterns", x => x.Id);
});
migrationBuilder.CreateTable(
name: "fta_technical_setups",
columns: table => new
{
SetupId = table.Column<Guid>(type: "uuid", nullable: false),
Isin = table.Column<string>(type: "character varying(20)", maxLength: 20, nullable: false),
Symbol = table.Column<string>(type: "character varying(30)", maxLength: 30, nullable: false),
Timeframe = table.Column<string>(type: "character varying(10)", maxLength: 10, nullable: false),
StrategyKey = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
StrategyName = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
Direction = table.Column<string>(type: "character varying(10)", maxLength: 10, nullable: false),
QualityScore = table.Column<decimal>(type: "numeric(6,2)", nullable: false),
CurrentPrice = table.Column<decimal>(type: "numeric(18,4)", nullable: false),
EntryPrice = table.Column<decimal>(type: "numeric(18,4)", nullable: false),
InvalidationPrice = table.Column<decimal>(type: "numeric(18,4)", nullable: false),
CurrentAtr = table.Column<decimal>(type: "numeric(18,4)", nullable: false),
EstimatedRiskRewardRatio = table.Column<decimal>(type: "numeric(8,2)", nullable: false),
ExitPlan = table.Column<string>(type: "jsonb", nullable: false),
TechnicalRationale = table.Column<string>(type: "text", nullable: false),
TriggeringPatterns = table.Column<string>(type: "jsonb", nullable: false),
IndicatorSnapshot = table.Column<string>(type: "jsonb", nullable: false),
IsTopPick = table.Column<bool>(type: "boolean", nullable: false),
Rating = table.Column<string>(type: "character varying(5)", maxLength: 5, nullable: false),
IsActive = table.Column<bool>(type: "boolean", nullable: false),
CreatedAtUtc = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
ExpiresAtUtc = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_fta_technical_setups", x => x.SetupId);
});
migrationBuilder.CreateIndex(
name: "IX_DynamicSettings_Key",
table: "DynamicSettings",
column: "Key",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_fta_candles_Isin_Timeframe_TimestampUtc",
table: "fta_candles",
columns: new[] { "Isin", "Timeframe", "TimestampUtc" });
migrationBuilder.CreateIndex(
name: "IX_fta_candles_TimestampUtc",
table: "fta_candles",
column: "TimestampUtc");
migrationBuilder.CreateIndex(
name: "IX_fta_detected_patterns_Isin_DetectedAtUtc",
table: "fta_detected_patterns",
columns: new[] { "Isin", "DetectedAtUtc" });
migrationBuilder.CreateIndex(
name: "IX_fta_detected_patterns_PatternType",
table: "fta_detected_patterns",
column: "PatternType");
migrationBuilder.CreateIndex(
name: "IX_fta_detected_patterns_QualityScore",
table: "fta_detected_patterns",
column: "QualityScore");
migrationBuilder.CreateIndex(
name: "IX_fta_technical_setups_CreatedAtUtc",
table: "fta_technical_setups",
column: "CreatedAtUtc");
migrationBuilder.CreateIndex(
name: "IX_fta_technical_setups_Isin_IsActive_ExpiresAtUtc",
table: "fta_technical_setups",
columns: new[] { "Isin", "IsActive", "ExpiresAtUtc" });
migrationBuilder.CreateIndex(
name: "IX_fta_technical_setups_IsTopPick",
table: "fta_technical_setups",
column: "IsTopPick");
migrationBuilder.CreateIndex(
name: "IX_fta_technical_setups_QualityScore",
table: "fta_technical_setups",
column: "QualityScore");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "DynamicSettings");
migrationBuilder.DropTable(
name: "fta_candles");
migrationBuilder.DropTable(
name: "fta_detected_patterns");
migrationBuilder.DropTable(
name: "fta_technical_setups");
}
}
}
@@ -0,0 +1,291 @@
// <auto-generated />
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("20260821153627_SyncTechnicalsModelDrift")]
partial class SyncTechnicalsModelDrift
{
/// <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("FinlyticTechnicals.Entities.FtaCandleEntity", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<decimal?>("Ask")
.HasColumnType("decimal(18,4)");
b.Property<decimal?>("Bid")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("Close")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("High")
.HasColumnType("decimal(18,4)");
b.Property<string>("Isin")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<decimal>("Low")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("Open")
.HasColumnType("decimal(18,4)");
b.Property<string>("Symbol")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property<string>("Timeframe")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property<DateTime>("TimestampUtc")
.HasColumnType("timestamp with time zone");
b.Property<long>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("Bias")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<string>("Category")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime>("DetectedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("ExtraData")
.HasColumnType("jsonb");
b.Property<decimal>("InvalidationLevel")
.HasColumnType("decimal(18,4)");
b.Property<string>("Isin")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<decimal>("KeyPriceLevel")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("LowerBoundary")
.HasColumnType("decimal(18,4)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property<string>("PatternType")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property<decimal>("QualityScore")
.HasColumnType("decimal(6,2)");
b.Property<string>("Timeframe")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property<decimal>("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.FtaTechnicalSetupEntity", b =>
{
b.Property<Guid>("SetupId")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTime>("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<decimal>("CurrentAtr")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("CurrentPrice")
.HasColumnType("decimal(18,4)");
b.Property<string>("Direction")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property<decimal>("EntryPrice")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("EstimatedRiskRewardRatio")
.HasColumnType("decimal(8,2)");
b.Property<string>("ExitPlan")
.IsRequired()
.HasColumnType("jsonb");
b.Property<DateTime>("ExpiresAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("IndicatorSnapshot")
.IsRequired()
.HasColumnType("jsonb");
b.Property<decimal>("InvalidationPrice")
.HasColumnType("decimal(18,4)");
b.Property<bool>("IsActive")
.HasColumnType("boolean");
b.Property<bool>("IsTopPick")
.HasColumnType("boolean");
b.Property<string>("Isin")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<decimal>("QualityScore")
.HasColumnType("decimal(6,2)");
b.Property<string>("Rating")
.IsRequired()
.HasMaxLength(5)
.HasColumnType("character varying(5)");
b.Property<string>("StrategyKey")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property<string>("StrategyName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property<string>("Symbol")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property<string>("TechnicalRationale")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Timeframe")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property<string>("TriggeringPatterns")
.IsRequired()
.HasColumnType("jsonb");
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
}
}
}
@@ -0,0 +1,27 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace FinlyticTechnicals.Migrations
{
/// <inheritdoc />
public partial class SyncTechnicalsModelDrift : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateIndex(
name: "IX_fta_technical_setups_IsActive_IsTopPick_QualityScore",
table: "fta_technical_setups",
columns: new[] { "IsActive", "IsTopPick", "QualityScore" });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_fta_technical_setups_IsActive_IsTopPick_QualityScore",
table: "fta_technical_setups");
}
}
}
@@ -0,0 +1,331 @@
// <auto-generated />
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("20260822081353_AddMonitoredUniverseTable")]
partial class AddMonitoredUniverseTable
{
/// <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("FinlyticTechnicals.Entities.FtaCandleEntity", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<decimal?>("Ask")
.HasColumnType("decimal(18,4)");
b.Property<decimal?>("Bid")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("Close")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("High")
.HasColumnType("decimal(18,4)");
b.Property<string>("Isin")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<decimal>("Low")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("Open")
.HasColumnType("decimal(18,4)");
b.Property<string>("Symbol")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property<string>("Timeframe")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property<DateTime>("TimestampUtc")
.HasColumnType("timestamp with time zone");
b.Property<long>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("Bias")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<string>("Category")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime>("DetectedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("ExtraData")
.HasColumnType("jsonb");
b.Property<decimal>("InvalidationLevel")
.HasColumnType("decimal(18,4)");
b.Property<string>("Isin")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<decimal>("KeyPriceLevel")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("LowerBoundary")
.HasColumnType("decimal(18,4)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property<string>("PatternType")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property<decimal>("QualityScore")
.HasColumnType("decimal(6,2)");
b.Property<string>("Timeframe")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property<decimal>("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<string>("Isin")
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<DateTime>("AddedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<DateTime?>("ExpiresAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<int>("Priority")
.HasColumnType("integer");
b.Property<string>("Source")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<string>("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<Guid>("SetupId")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTime>("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<decimal>("CurrentAtr")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("CurrentPrice")
.HasColumnType("decimal(18,4)");
b.Property<string>("Direction")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property<decimal>("EntryPrice")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("EstimatedRiskRewardRatio")
.HasColumnType("decimal(8,2)");
b.Property<string>("ExitPlan")
.IsRequired()
.HasColumnType("jsonb");
b.Property<DateTime>("ExpiresAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("IndicatorSnapshot")
.IsRequired()
.HasColumnType("jsonb");
b.Property<decimal>("InvalidationPrice")
.HasColumnType("decimal(18,4)");
b.Property<bool>("IsActive")
.HasColumnType("boolean");
b.Property<bool>("IsTopPick")
.HasColumnType("boolean");
b.Property<string>("Isin")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<decimal>("QualityScore")
.HasColumnType("decimal(6,2)");
b.Property<string>("Rating")
.IsRequired()
.HasMaxLength(5)
.HasColumnType("character varying(5)");
b.Property<string>("StrategyKey")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property<string>("StrategyName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property<string>("Symbol")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property<string>("TechnicalRationale")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Timeframe")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property<string>("TriggeringPatterns")
.IsRequired()
.HasColumnType("jsonb");
b.Property<DateTime?>("UniverseEnteredAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("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
}
}
}
@@ -0,0 +1,69 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace FinlyticTechnicals.Migrations
{
/// <inheritdoc />
public partial class AddMonitoredUniverseTable : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTime>(
name: "UniverseEnteredAtUtc",
table: "fta_technical_setups",
type: "timestamp with time zone",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "UniverseSource",
table: "fta_technical_setups",
type: "character varying(20)",
maxLength: 20,
nullable: true);
migrationBuilder.CreateTable(
name: "fta_monitored_universe_assets",
columns: table => new
{
Isin = table.Column<string>(type: "character varying(20)", maxLength: 20, nullable: false),
Symbol = table.Column<string>(type: "character varying(30)", maxLength: 30, nullable: true),
Source = table.Column<string>(type: "character varying(20)", maxLength: 20, nullable: false),
Priority = table.Column<int>(type: "integer", nullable: false),
AddedAtUtc = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
ExpiresAtUtc = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_fta_monitored_universe_assets", x => x.Isin);
});
migrationBuilder.CreateIndex(
name: "IX_fta_monitored_universe_assets_ExpiresAtUtc",
table: "fta_monitored_universe_assets",
column: "ExpiresAtUtc");
migrationBuilder.CreateIndex(
name: "IX_fta_monitored_universe_assets_Source",
table: "fta_monitored_universe_assets",
column: "Source");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "fta_monitored_universe_assets");
migrationBuilder.DropColumn(
name: "UniverseEnteredAtUtc",
table: "fta_technical_setups");
migrationBuilder.DropColumn(
name: "UniverseSource",
table: "fta_technical_setups");
}
}
}
@@ -0,0 +1,335 @@
// <auto-generated />
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
{
/// <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("FinlyticTechnicals.Entities.FtaCandleEntity", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<decimal?>("Ask")
.HasColumnType("decimal(18,4)");
b.Property<decimal?>("Bid")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("Close")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("High")
.HasColumnType("decimal(18,4)");
b.Property<string>("Isin")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<decimal>("Low")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("Open")
.HasColumnType("decimal(18,4)");
b.Property<string>("Symbol")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property<string>("Timeframe")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property<DateTime>("TimestampUtc")
.HasColumnType("timestamp with time zone");
b.Property<long>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("Bias")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<string>("Category")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime>("DetectedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("ExtraData")
.HasColumnType("jsonb");
b.Property<decimal>("InvalidationLevel")
.HasColumnType("decimal(18,4)");
b.Property<string>("Isin")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<decimal>("KeyPriceLevel")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("LowerBoundary")
.HasColumnType("decimal(18,4)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property<string>("PatternType")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property<decimal>("QualityScore")
.HasColumnType("decimal(6,2)");
b.Property<string>("Timeframe")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property<decimal>("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<string>("Isin")
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<DateTime>("AddedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<DateTime?>("ExpiresAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<int>("Priority")
.HasColumnType("integer");
b.Property<string>("Source")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<string>("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<Guid>("SetupId")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTime>("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<decimal>("CurrentAtr")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("CurrentPrice")
.HasColumnType("decimal(18,4)");
b.Property<string>("Direction")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property<decimal>("EntryPrice")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("EstimatedRiskRewardRatio")
.HasColumnType("decimal(8,2)");
b.Property<string>("ExitPlan")
.IsRequired()
.HasColumnType("jsonb");
b.Property<DateTime>("ExpiresAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("IndicatorSnapshot")
.IsRequired()
.HasColumnType("jsonb");
b.Property<decimal>("InvalidationPrice")
.HasColumnType("decimal(18,4)");
b.Property<bool>("IsActive")
.HasColumnType("boolean");
b.Property<bool>("IsTopPick")
.HasColumnType("boolean");
b.Property<string>("Isin")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<decimal>("QualityScore")
.HasColumnType("decimal(6,2)");
b.Property<string>("Rating")
.IsRequired()
.HasMaxLength(5)
.HasColumnType("character varying(5)");
b.Property<string>("Regime")
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property<string>("StrategyKey")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property<string>("StrategyName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property<string>("Symbol")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property<string>("TechnicalRationale")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Timeframe")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property<string>("TriggeringPatterns")
.IsRequired()
.HasColumnType("jsonb");
b.Property<DateTime?>("UniverseEnteredAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("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
}
}
}
@@ -0,0 +1,29 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace FinlyticTechnicals.Migrations
{
/// <inheritdoc />
public partial class AddRegimeToTechnicalSetups : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "Regime",
table: "fta_technical_setups",
type: "character varying(30)",
maxLength: 30,
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Regime",
table: "fta_technical_setups");
}
}
}
@@ -0,0 +1,332 @@
// <auto-generated />
using System;
using FinlyticTechnicals.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace FinlyticTechnicals.Migrations
{
[DbContext(typeof(TechnicalAnalysisDbContext))]
partial class TechnicalAnalysisDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(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("FinlyticTechnicals.Entities.FtaCandleEntity", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<decimal?>("Ask")
.HasColumnType("decimal(18,4)");
b.Property<decimal?>("Bid")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("Close")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("High")
.HasColumnType("decimal(18,4)");
b.Property<string>("Isin")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<decimal>("Low")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("Open")
.HasColumnType("decimal(18,4)");
b.Property<string>("Symbol")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property<string>("Timeframe")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property<DateTime>("TimestampUtc")
.HasColumnType("timestamp with time zone");
b.Property<long>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("Bias")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<string>("Category")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime>("DetectedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("ExtraData")
.HasColumnType("jsonb");
b.Property<decimal>("InvalidationLevel")
.HasColumnType("decimal(18,4)");
b.Property<string>("Isin")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<decimal>("KeyPriceLevel")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("LowerBoundary")
.HasColumnType("decimal(18,4)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property<string>("PatternType")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property<decimal>("QualityScore")
.HasColumnType("decimal(6,2)");
b.Property<string>("Timeframe")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property<decimal>("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<string>("Isin")
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<DateTime>("AddedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<DateTime?>("ExpiresAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<int>("Priority")
.HasColumnType("integer");
b.Property<string>("Source")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<string>("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<Guid>("SetupId")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTime>("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<decimal>("CurrentAtr")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("CurrentPrice")
.HasColumnType("decimal(18,4)");
b.Property<string>("Direction")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property<decimal>("EntryPrice")
.HasColumnType("decimal(18,4)");
b.Property<decimal>("EstimatedRiskRewardRatio")
.HasColumnType("decimal(8,2)");
b.Property<string>("ExitPlan")
.IsRequired()
.HasColumnType("jsonb");
b.Property<DateTime>("ExpiresAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("IndicatorSnapshot")
.IsRequired()
.HasColumnType("jsonb");
b.Property<decimal>("InvalidationPrice")
.HasColumnType("decimal(18,4)");
b.Property<bool>("IsActive")
.HasColumnType("boolean");
b.Property<bool>("IsTopPick")
.HasColumnType("boolean");
b.Property<string>("Isin")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<decimal>("QualityScore")
.HasColumnType("decimal(6,2)");
b.Property<string>("Rating")
.IsRequired()
.HasMaxLength(5)
.HasColumnType("character varying(5)");
b.Property<string>("Regime")
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property<string>("StrategyKey")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property<string>("StrategyName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property<string>("Symbol")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property<string>("TechnicalRationale")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Timeframe")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property<string>("TriggeringPatterns")
.IsRequired()
.HasColumnType("jsonb");
b.Property<DateTime?>("UniverseEnteredAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("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
}
}
}