//
using System;
using FinlyticBot.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace FinlyticBot.Migrations
{
[DbContext(typeof(BotDbContext))]
partial class BotDbContextModelSnapshot : 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("FinlyticBot.Entities.BotAuditLogEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("AccountEquity")
.HasColumnType("decimal(18,4)");
b.Property("Action")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property("CalculatedSize")
.HasColumnType("decimal(18,4)");
b.Property("IsAccepted")
.HasColumnType("boolean");
b.Property("Reason")
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property("Symbol")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property("Timestamp")
.HasColumnType("timestamp with time zone");
b.Property("TradeId")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.HasKey("Id");
b.HasIndex("Action");
b.HasIndex("Symbol");
b.HasIndex("Timestamp");
b.HasIndex("TradeId");
b.ToTable("BotAuditLogs");
});
modelBuilder.Entity("FinlyticBot.Entities.ExecutedPaperTradeEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("ActualFillPrice")
.HasColumnType("decimal(18,4)");
b.Property("AlpacaOrderId")
.HasColumnType("uuid");
b.Property("CalculatedCrv")
.HasColumnType("decimal(18,4)");
b.Property("ClosedAt")
.HasColumnType("timestamp with time zone");
b.Property("CompanyName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("character varying(200)");
b.Property("FilledAt")
.HasColumnType("timestamp with time zone");
b.Property("Isin")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property("PlacedAt")
.HasColumnType("timestamp with time zone");
b.Property("Quantity")
.HasColumnType("decimal(18,4)");
b.Property("RealizedPnl")
.HasColumnType("decimal(18,4)");
b.Property("RealizedPnlPercent")
.HasColumnType("decimal(18,4)");
b.Property("RejectReason")
.HasMaxLength(1000)
.HasColumnType("character varying(1000)");
b.Property("Side")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property("SignalEntryPrice")
.HasColumnType("decimal(18,4)");
b.Property("SlippagePercent")
.HasColumnType("decimal(18,4)");
b.Property("Status")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property("StopLossPrice")
.HasColumnType("decimal(18,4)");
b.Property("Symbol")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property("TakeProfitPrice1")
.HasColumnType("decimal(18,4)");
b.Property("TakeProfitPrice2")
.HasColumnType("decimal(18,4)");
b.Property("TradeId")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property("WinRate")
.HasColumnType("double precision");
b.HasKey("Id");
b.HasIndex("AlpacaOrderId");
b.HasIndex("Isin");
b.HasIndex("PlacedAt");
b.HasIndex("Status");
b.HasIndex("Symbol");
b.HasIndex("TradeId")
.IsUnique();
b.ToTable("ExecutedPaperTrades");
});
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");
});
#pragma warning restore 612, 618
}
}
}