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
+15
View File
@@ -0,0 +1,15 @@
namespace FinlyticAssets.Entities;
public abstract class AssetEntity
{
public string Isin { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public string Type { get; set; } = string.Empty;
public string InstrumentCategory { get; set; } = string.Empty;
public bool HasCfd { get; set; }
public string? ImageId { get; set; }
public DateTime LastUpdatedAt { get; set; } = DateTime.UtcNow;
public List<TagEntity> Tags { get; set; } = new();
}
+9
View File
@@ -0,0 +1,9 @@
using FinlyticAssets.Entities;
namespace FinlyticAssets.Entities;
public class BondEntity : AssetEntity
{
public string BondIssuerName { get; set; } = string.Empty;
public string SearchSubtitle { get; set; } = string.Empty;
}
+7
View File
@@ -0,0 +1,7 @@
namespace FinlyticAssets.Entities;
public class CryptoEntity : AssetEntity
{
public string Subtitle { get; set; } = string.Empty;
public string SearchSubtitle { get; set; } = string.Empty;
}
@@ -0,0 +1,61 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace FinlyticAssets.Entities;
public enum OptionType
{
Long,
Short
}
public class DerivativeEntity : AssetEntity
{
// --- Verknüpfung zum Basiswert (Underlying) ---
[StringLength(12, MinimumLength = 12)]
public string? UnderlyingIsin { get; set; }
// --- Derivat-Spezifikationen ---
public OptionType OptionType { get; set; } // Long / Short
[MaxLength(100)]
public string ProductCategoryName { get; set; } = string.Empty; // Z.B. "Best Turbo"
[MaxLength(100)]
public string NextGenProductCategoryName { get; set; } = string.Empty; // Z.B. "Turbo"
// --- Kennzahlen (Präzise decimals für Finanzwerte) ---
[Column(TypeName = "numeric(18,6)")]
public decimal Strike { get; set; } // Basispreis
[Column(TypeName = "numeric(18,6)")]
public decimal Barrier { get; set; } // Knock-Out-Schwelle
[Column(TypeName = "numeric(10,4)")]
public decimal Leverage { get; set; } // Hebel (z. B. 1.01)
public decimal? Size { get; set; }
public decimal? Factor { get; set; }
public decimal? Delta { get; set; }
[MaxLength(10)]
public string Currency { get; set; } = "EUR";
public DateTime? Expiry { get; set; } // Verfallsdatum (null bei Open-End / Best Turbo)
// --- Emittent (Issuer) Daten ---
[MaxLength(150)]
public string Issuer { get; set; } = string.Empty; // Z.B. "Société Générale"
[MaxLength(150)]
public string IssuerDisplayName { get; set; } = string.Empty;
public string? IssuerImageId { get; set; }
// PostgreSQL Mapped Array für TR-Kategorien
public List<string> DerivativeProductCategories { get; set; } = new();
}
+10
View File
@@ -0,0 +1,10 @@
namespace FinlyticAssets.Entities;
public class EtfEntity : AssetEntity
{
public List<string> DerivativeProductCategories { get; set; } = new();
public string EtfDescription { get; set; } = string.Empty;
public string MappedEtfIndexName { get; set; } = string.Empty;
public string Subtitle { get; set; } = string.Empty;
public string SearchSubtitle { get; set; } = string.Empty;
}
+6
View File
@@ -0,0 +1,6 @@
namespace FinlyticAssets.Entities;
public class StockEntity : AssetEntity
{
public List<string> DerivativeProductCategories { get; set; } = new();
}
@@ -0,0 +1,6 @@
namespace FinlyticAssets.Entities;
public class SyntheticEntity : AssetEntity
{
public List<string> DerivativeProductCategories { get; set; } = new();
}
+10
View File
@@ -0,0 +1,10 @@
namespace FinlyticAssets.Entities;
public class TagEntity
{
public string Id { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public string Type { get; set; } = string.Empty;
public List<AssetEntity> Assets { get; set; } = new();
}