feat(analyzer): update MQTT handler, active trade monitoring, and dynamic settings
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using FinlyticAnalyzer.Entities;
|
||||
using FinlyticCore.Entities.Settings;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace FinlyticAnalyzer.Database;
|
||||
@@ -7,6 +8,7 @@ public class AnalyzerDbContext : DbContext
|
||||
{
|
||||
public AnalyzerDbContext(DbContextOptions<AnalyzerDbContext> options) : base(options) { }
|
||||
|
||||
public DbSet<SettingEntity> DynamicSettings => Set<SettingEntity>();
|
||||
public DbSet<AnalysisEntity> Analyses => Set<AnalysisEntity>();
|
||||
public DbSet<AnalyzerSettingsEntity> Settings => Set<AnalyzerSettingsEntity>();
|
||||
public DbSet<TradeProposalEntity> TradeProposals => Set<TradeProposalEntity>();
|
||||
@@ -15,6 +17,12 @@ public class AnalyzerDbContext : DbContext
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
|
||||
modelBuilder.Entity<SettingEntity>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id);
|
||||
entity.HasIndex(e => e.Key);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<AnalysisEntity>(entity =>
|
||||
{
|
||||
entity.HasIndex(e => e.AnalysisId).IsUnique();
|
||||
|
||||
Reference in New Issue
Block a user