refactor(assets): update asset entity mappings, database migrations, and MQTT RPC handlers
This commit is contained in:
@@ -56,9 +56,6 @@ namespace FinlyticAssets.Migrations
|
||||
b.Property<bool>("HasCfd")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("ImageId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTime>("LastUpdatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
@@ -81,41 +78,93 @@ namespace FinlyticAssets.Migrations
|
||||
b.UseTphMappingStrategy();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FinlyticAssets.Entities.Settings", b =>
|
||||
modelBuilder.Entity("FinlyticAssets.Entities.DerivativeEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
b.Property<string>("Isin")
|
||||
.HasMaxLength(12)
|
||||
.HasColumnType("character varying(12)");
|
||||
|
||||
b.Property<int>("AssetUpdateTypeDelay")
|
||||
.HasColumnType("integer");
|
||||
b.Property<decimal>("Barrier")
|
||||
.HasColumnType("numeric(18,6)");
|
||||
|
||||
b.Property<int>("BatchAssetUpdateDelay")
|
||||
.HasColumnType("integer");
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int>("CurrentScanningPage")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("CurrentScanningType")
|
||||
b.Property<string>("Currency")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("character varying(50)");
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("character varying(10)");
|
||||
|
||||
b.Property<bool>("FinishedInitialScan")
|
||||
.HasColumnType("boolean");
|
||||
b.Property<decimal?>("Delta")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<int>("InitAssetUpdateTypeDelay")
|
||||
b.Property<string>("DerivativeProductCategories")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
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<DateTime>("LastUpdatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<decimal>("Leverage")
|
||||
.HasColumnType("numeric(10,4)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("NextGenProductCategoryName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("character varying(100)");
|
||||
|
||||
b.Property<int>("OptionType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("InitBatchAssetUpdateDelay")
|
||||
.HasColumnType("integer");
|
||||
b.Property<string>("ProductCategoryName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("character varying(100)");
|
||||
|
||||
b.Property<int>("TradeRepublicMaxRequestPageSize")
|
||||
.HasColumnType("integer");
|
||||
b.Property<decimal?>("Size")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.HasKey("Id");
|
||||
b.Property<decimal>("Strike")
|
||||
.HasColumnType("numeric(18,6)");
|
||||
|
||||
b.ToTable("Settings");
|
||||
b.Property<string>("UnderlyingIsin")
|
||||
.IsRequired()
|
||||
.HasMaxLength(12)
|
||||
.HasColumnType("character varying(12)");
|
||||
|
||||
b.HasKey("Isin");
|
||||
|
||||
b.HasIndex("LastUpdatedAt");
|
||||
|
||||
b.HasIndex("Leverage");
|
||||
|
||||
b.HasIndex("OptionType");
|
||||
|
||||
b.HasIndex("UnderlyingIsin");
|
||||
|
||||
b.HasIndex("UnderlyingIsin", "OptionType", "Leverage", "Barrier");
|
||||
|
||||
b.ToTable("Derivatives");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FinlyticAssets.Entities.TagEntity", b =>
|
||||
@@ -167,109 +216,6 @@ namespace FinlyticAssets.Migrations
|
||||
b.ToTable("DynamicSettings");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FinlyticAssets.Entities.BondEntity", b =>
|
||||
{
|
||||
b.HasBaseType("FinlyticAssets.Entities.AssetEntity");
|
||||
|
||||
b.Property<string>("BondIssuerName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("SearchSubtitle")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasDiscriminator().HasValue("Bond");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FinlyticAssets.Entities.CryptoEntity", b =>
|
||||
{
|
||||
b.HasBaseType("FinlyticAssets.Entities.AssetEntity");
|
||||
|
||||
b.Property<string>("SearchSubtitle")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Subtitle")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.ToTable("TradeRepublicAssets", t =>
|
||||
{
|
||||
t.Property("SearchSubtitle")
|
||||
.HasColumnName("CryptoEntity_SearchSubtitle");
|
||||
});
|
||||
|
||||
b.HasDiscriminator().HasValue("Crypto");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FinlyticAssets.Entities.DerivativeEntity", b =>
|
||||
{
|
||||
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<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("FinlyticAssets.Entities.EtfEntity", b =>
|
||||
{
|
||||
b.HasBaseType("FinlyticAssets.Entities.AssetEntity");
|
||||
@@ -294,18 +240,6 @@ namespace FinlyticAssets.Migrations
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.ToTable("TradeRepublicAssets", t =>
|
||||
{
|
||||
t.Property("DerivativeProductCategories")
|
||||
.HasColumnName("EtfEntity_DerivativeProductCategories");
|
||||
|
||||
t.Property("SearchSubtitle")
|
||||
.HasColumnName("EtfEntity_SearchSubtitle");
|
||||
|
||||
t.Property("Subtitle")
|
||||
.HasColumnName("EtfEntity_Subtitle");
|
||||
});
|
||||
|
||||
b.HasDiscriminator().HasValue("Etf");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user