feat(assets): update scanner background service, derivative entities, and dynamic settings

This commit is contained in:
2026-08-14 23:55:47 +02:00
parent 2151fd89f0
commit 4d5ab09bbd
18 changed files with 1318 additions and 71 deletions
@@ -1,4 +1,4 @@
// <auto-generated />
// <auto-generated />
using System;
using FinlyticAssets.Database;
using Microsoft.EntityFrameworkCore;
@@ -40,44 +40,7 @@ namespace FinlyticAssets.Migrations
b.ToTable("AssetEntityTagEntity");
});
modelBuilder.Entity("FinlyticAssets.Entities.Settings", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<int>("AssetUpdateTypeDelay")
.HasColumnType("integer");
b.Property<int>("BatchAssetUpdateDelay")
.HasColumnType("integer");
b.Property<int>("CurrentScanningPage")
.HasColumnType("integer");
b.Property<string>("CurrentScanningType")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property<bool>("FinishedInitialScan")
.HasColumnType("boolean");
b.Property<int>("InitAssetUpdateTypeDelay")
.HasColumnType("integer");
b.Property<int>("InitBatchAssetUpdateDelay")
.HasColumnType("integer");
b.Property<int>("TradeRepublicMaxRequestPageSize")
.HasColumnType("integer");
b.HasKey("Id");
b.ToTable("Settings");
});
modelBuilder.Entity("FinlyticCore.Entities.Assets.AssetEntity", b =>
modelBuilder.Entity("FinlyticAssets.Entities.AssetEntity", b =>
{
b.Property<string>("Isin")
.HasColumnType("text");
@@ -118,7 +81,44 @@ namespace FinlyticAssets.Migrations
b.UseTphMappingStrategy();
});
modelBuilder.Entity("FinlyticCore.Entities.Assets.TagEntity", b =>
modelBuilder.Entity("FinlyticAssets.Entities.Settings", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<int>("AssetUpdateTypeDelay")
.HasColumnType("integer");
b.Property<int>("BatchAssetUpdateDelay")
.HasColumnType("integer");
b.Property<int>("CurrentScanningPage")
.HasColumnType("integer");
b.Property<string>("CurrentScanningType")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property<bool>("FinishedInitialScan")
.HasColumnType("boolean");
b.Property<int>("InitAssetUpdateTypeDelay")
.HasColumnType("integer");
b.Property<int>("InitBatchAssetUpdateDelay")
.HasColumnType("integer");
b.Property<int>("TradeRepublicMaxRequestPageSize")
.HasColumnType("integer");
b.HasKey("Id");
b.ToTable("Settings");
});
modelBuilder.Entity("FinlyticAssets.Entities.TagEntity", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
@@ -136,9 +136,39 @@ namespace FinlyticAssets.Migrations
b.ToTable("TradeRepublicTags");
});
modelBuilder.Entity("FinlyticCore.Entities.Assets.BondEntity", b =>
modelBuilder.Entity("FinlyticCore.Entities.Settings.SettingEntity", b =>
{
b.HasBaseType("FinlyticCore.Entities.Assets.AssetEntity");
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");
b.ToTable("DynamicSettings");
});
modelBuilder.Entity("FinlyticAssets.Entities.BondEntity", b =>
{
b.HasBaseType("FinlyticAssets.Entities.AssetEntity");
b.Property<string>("BondIssuerName")
.IsRequired()
@@ -151,9 +181,9 @@ namespace FinlyticAssets.Migrations
b.HasDiscriminator().HasValue("Bond");
});
modelBuilder.Entity("FinlyticCore.Entities.Assets.CryptoEntity", b =>
modelBuilder.Entity("FinlyticAssets.Entities.CryptoEntity", b =>
{
b.HasBaseType("FinlyticCore.Entities.Assets.AssetEntity");
b.HasBaseType("FinlyticAssets.Entities.AssetEntity");
b.Property<string>("SearchSubtitle")
.IsRequired()
@@ -172,23 +202,76 @@ namespace FinlyticAssets.Migrations
b.HasDiscriminator().HasValue("Crypto");
});
modelBuilder.Entity("FinlyticCore.Entities.Assets.DerivativeEntity", b =>
modelBuilder.Entity("FinlyticAssets.Entities.DerivativeEntity", b =>
{
b.HasBaseType("FinlyticCore.Entities.Assets.AssetEntity");
b.HasBaseType("FinlyticAssets.Entities.AssetEntity");
b.Property<decimal>("Barrier")
.HasColumnType("numeric(18,6)");
b.Property<string>("Currency")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property<decimal?>("Delta")
.HasColumnType("numeric");
b.Property<string>("DerivativeProductCategories")
.IsRequired()
.HasColumnType("text");
b.Property<string>("UnderlyingIsin")
b.Property<DateTime?>("Expiry")
.HasColumnType("timestamp with time zone");
b.Property<decimal?>("Factor")
.HasColumnType("numeric");
b.Property<string>("Issuer")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("character varying(150)");
b.Property<string>("IssuerDisplayName")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("character varying(150)");
b.Property<string>("IssuerImageId")
.HasColumnType("text");
b.Property<decimal>("Leverage")
.HasColumnType("numeric(10,4)");
b.Property<string>("NextGenProductCategoryName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property<int>("OptionType")
.HasColumnType("integer");
b.Property<string>("ProductCategoryName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property<decimal?>("Size")
.HasColumnType("numeric");
b.Property<decimal>("Strike")
.HasColumnType("numeric(18,6)");
b.Property<string>("UnderlyingIsin")
.HasMaxLength(12)
.HasColumnType("character varying(12)");
b.HasDiscriminator().HasValue("Derivative");
});
modelBuilder.Entity("FinlyticCore.Entities.Assets.EtfEntity", b =>
modelBuilder.Entity("FinlyticAssets.Entities.EtfEntity", b =>
{
b.HasBaseType("FinlyticCore.Entities.Assets.AssetEntity");
b.HasBaseType("FinlyticAssets.Entities.AssetEntity");
b.Property<string>("DerivativeProductCategories")
.IsRequired()
@@ -225,9 +308,9 @@ namespace FinlyticAssets.Migrations
b.HasDiscriminator().HasValue("Etf");
});
modelBuilder.Entity("FinlyticCore.Entities.Assets.StockEntity", b =>
modelBuilder.Entity("FinlyticAssets.Entities.StockEntity", b =>
{
b.HasBaseType("FinlyticCore.Entities.Assets.AssetEntity");
b.HasBaseType("FinlyticAssets.Entities.AssetEntity");
b.Property<string>("DerivativeProductCategories")
.IsRequired()
@@ -242,9 +325,9 @@ namespace FinlyticAssets.Migrations
b.HasDiscriminator().HasValue("Stock");
});
modelBuilder.Entity("FinlyticCore.Entities.Assets.SyntheticEntity", b =>
modelBuilder.Entity("FinlyticAssets.Entities.SyntheticEntity", b =>
{
b.HasBaseType("FinlyticCore.Entities.Assets.AssetEntity");
b.HasBaseType("FinlyticAssets.Entities.AssetEntity");
b.Property<string>("DerivativeProductCategories")
.IsRequired()
@@ -261,13 +344,13 @@ namespace FinlyticAssets.Migrations
modelBuilder.Entity("AssetEntityTagEntity", b =>
{
b.HasOne("FinlyticCore.Entities.Assets.TagEntity", null)
b.HasOne("FinlyticAssets.Entities.TagEntity", null)
.WithMany()
.HasForeignKey("TagsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("FinlyticCore.Entities.Assets.AssetEntity", null)
b.HasOne("FinlyticAssets.Entities.AssetEntity", null)
.WithMany()
.HasForeignKey("AssetsIsin", "AssetsInstrumentCategory")
.OnDelete(DeleteBehavior.Cascade)