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
+9 -2
View File
@@ -1,6 +1,5 @@
using FinlyticAssets.Entities;
using FinlyticCore.Entities.Assets;
using FinlyticCore.Models.Assets;
using FinlyticCore.Entities.Settings;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking;
@@ -12,6 +11,7 @@ public class AssetsDbContext : DbContext
{
}
public DbSet<SettingEntity> DynamicSettings => Set<SettingEntity>();
public DbSet<Settings> Settings { get; set; }
public DbSet<AssetEntity> TradeRepublicAssets { get; set; }
public DbSet<TagEntity> TradeRepublicTags { get; set; }
@@ -19,6 +19,13 @@ public class AssetsDbContext : DbContext
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.Entity<SettingEntity>(entity =>
{
entity.HasKey(e => e.Id);
entity.HasIndex(e => e.Key);
});
modelBuilder.Entity<AssetEntity>(entity =>
{
entity.HasKey(e => new {e.Isin, e.InstrumentCategory});