R3 Slice 3: CongressTrading-Modul + Worker-Log + core_settings auf EF Core - Modul: CongressTradingDbContext (ct_congressMember/ct_trade) + Design-Time-Factory; CongressRepository von Dapper auf EF; CongressTrade.DetailsFetched ergaenzt; Dapper entfernt - Core: CoreSettingsService (core_settings via EF); WorkerBase-Log auf EF (core_worker_log); 7 Worker-Ctors DatabaseService -> IDbContextFactory<CoreDbContext> - CoreMigrations + CongressMigrations (Dapper) entfernt; core_-Schema nun rein EF - EF-Migration InitialCongressTrading; AddCorePersistence-Fallback fuer leeren Connection-String (App startet ohne DB); Connection aus appsettings.Local.json (gitignored) - Tests: +4 CongressRepository (EF-InMemory) -> 39/39 gruen; Build + smoke-ui + App-Start ok Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> @
166 lines
5.7 KiB
C#
166 lines
5.7 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using IBKRTrader.Modules.CongressTrading.Persistence.Ef;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace IBKRTrader.Modules.CongressTrading.Persistence.Ef.Migrations
|
|
{
|
|
[DbContext(typeof(CongressTradingDbContext))]
|
|
[Migration("20260728092729_InitialCongressTrading")]
|
|
partial class InitialCongressTrading
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "8.0.13")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
|
|
|
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("IBKRTrader.Modules.CongressTrading.Models.CongressMember", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
|
|
|
|
b.Property<string>("BioId")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("varchar(20)");
|
|
|
|
b.Property<string>("Chamber")
|
|
.IsRequired()
|
|
.HasMaxLength(10)
|
|
.HasColumnType("varchar(10)");
|
|
|
|
b.Property<DateTime>("FirstSeen")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<DateTime>("LastUpdated")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("varchar(200)");
|
|
|
|
b.Property<string>("Party")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("varchar(50)");
|
|
|
|
b.Property<string>("ProfileUrl")
|
|
.IsRequired()
|
|
.HasMaxLength(500)
|
|
.HasColumnType("varchar(500)");
|
|
|
|
b.Property<string>("State")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("varchar(50)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("BioId")
|
|
.IsUnique();
|
|
|
|
b.ToTable("ct_congressMember", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("IBKRTrader.Modules.CongressTrading.Models.CongressTrade", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
|
|
|
|
b.Property<string>("Chamber")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("varchar(20)");
|
|
|
|
b.Property<string>("DetailUrl")
|
|
.IsRequired()
|
|
.HasMaxLength(500)
|
|
.HasColumnType("varchar(500)");
|
|
|
|
b.Property<bool>("DetailsFetched")
|
|
.HasColumnType("tinyint(1)");
|
|
|
|
b.Property<string>("IssuerId")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("varchar(20)");
|
|
|
|
b.Property<string>("IssuerName")
|
|
.IsRequired()
|
|
.HasMaxLength(500)
|
|
.HasColumnType("varchar(500)");
|
|
|
|
b.Property<string>("MemberBioId")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("varchar(20)");
|
|
|
|
b.Property<string>("Owner")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("varchar(50)");
|
|
|
|
b.Property<DateOnly?>("PublishedDate")
|
|
.HasColumnType("date");
|
|
|
|
b.Property<DateTime>("ScrapedAt")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<string>("Ticker")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("varchar(20)");
|
|
|
|
b.Property<DateOnly?>("TradeDate")
|
|
.HasColumnType("date");
|
|
|
|
b.Property<string>("TradeId")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("varchar(20)");
|
|
|
|
b.Property<string>("TradeType")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("varchar(50)");
|
|
|
|
b.Property<decimal?>("Value")
|
|
.HasPrecision(18, 2)
|
|
.HasColumnType("decimal(18,2)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("DetailsFetched");
|
|
|
|
b.HasIndex("MemberBioId");
|
|
|
|
b.HasIndex("Ticker");
|
|
|
|
b.HasIndex("TradeId")
|
|
.IsUnique();
|
|
|
|
b.ToTable("ct_trade", (string)null);
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|