feat(assets): update scanner background service, derivative entities, and dynamic settings
This commit is contained in:
@@ -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});
|
||||
|
||||
Reference in New Issue
Block a user