feat(Assets): update asset services and background workers
This commit is contained in:
@@ -0,0 +1,282 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using FinlyticAssets.Database;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FinlyticAssets.Migrations
|
||||
{
|
||||
[DbContext(typeof(AssetsDbContext))]
|
||||
[Migration("20260801073314_Init")]
|
||||
partial class Init
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "10.0.9")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("AssetEntityTagEntity", b =>
|
||||
{
|
||||
b.Property<string>("TagsId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("AssetsIsin")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("AssetsInstrumentCategory")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("TagsId", "AssetsIsin", "AssetsInstrumentCategory");
|
||||
|
||||
b.HasIndex("AssetsIsin", "AssetsInstrumentCategory");
|
||||
|
||||
b.ToTable("AssetEntityTagEntity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FinlyticAssets.Entities.Settings", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<int>("AssetUpdateTypeDelay")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("BatchAssetUpdateDelay")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("CurrentScanningPage")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("CurrentScanningType")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("character varying(50)");
|
||||
|
||||
b.Property<bool>("FinishedInitialScan")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("InitAssetUpdateTypeDelay")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("InitBatchAssetUpdateDelay")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("TradeRepublicMaxRequestPageSize")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Settings");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FinlyticCore.Entities.Assets.AssetEntity", b =>
|
||||
{
|
||||
b.Property<string>("Isin")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("InstrumentCategory")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("AssetType")
|
||||
.IsRequired()
|
||||
.HasMaxLength(13)
|
||||
.HasColumnType("character varying(13)");
|
||||
|
||||
b.Property<bool>("HasCfd")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("ImageId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTime>("LastUpdatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Type")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Isin", "InstrumentCategory");
|
||||
|
||||
b.HasIndex("LastUpdatedAt");
|
||||
|
||||
b.ToTable("TradeRepublicAssets");
|
||||
|
||||
b.HasDiscriminator<string>("AssetType").HasValue("AssetEntity");
|
||||
|
||||
b.UseTphMappingStrategy();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FinlyticCore.Entities.Assets.TagEntity", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Type")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("TradeRepublicTags");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FinlyticCore.Entities.Assets.BondEntity", b =>
|
||||
{
|
||||
b.HasBaseType("FinlyticCore.Entities.Assets.AssetEntity");
|
||||
|
||||
b.Property<string>("BondIssuerName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("SearchSubtitle")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasDiscriminator().HasValue("Bond");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FinlyticCore.Entities.Assets.CryptoEntity", b =>
|
||||
{
|
||||
b.HasBaseType("FinlyticCore.Entities.Assets.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("FinlyticCore.Entities.Assets.DerivativeEntity", b =>
|
||||
{
|
||||
b.HasBaseType("FinlyticCore.Entities.Assets.AssetEntity");
|
||||
|
||||
b.Property<string>("DerivativeProductCategories")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("UnderlyingIsin")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasDiscriminator().HasValue("Derivative");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FinlyticCore.Entities.Assets.EtfEntity", b =>
|
||||
{
|
||||
b.HasBaseType("FinlyticCore.Entities.Assets.AssetEntity");
|
||||
|
||||
b.Property<string>("DerivativeProductCategories")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("EtfDescription")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("MappedEtfIndexName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("SearchSubtitle")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Subtitle")
|
||||
.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");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FinlyticCore.Entities.Assets.StockEntity", b =>
|
||||
{
|
||||
b.HasBaseType("FinlyticCore.Entities.Assets.AssetEntity");
|
||||
|
||||
b.Property<string>("DerivativeProductCategories")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.ToTable("TradeRepublicAssets", t =>
|
||||
{
|
||||
t.Property("DerivativeProductCategories")
|
||||
.HasColumnName("StockEntity_DerivativeProductCategories");
|
||||
});
|
||||
|
||||
b.HasDiscriminator().HasValue("Stock");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FinlyticCore.Entities.Assets.SyntheticEntity", b =>
|
||||
{
|
||||
b.HasBaseType("FinlyticCore.Entities.Assets.AssetEntity");
|
||||
|
||||
b.Property<string>("DerivativeProductCategories")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.ToTable("TradeRepublicAssets", t =>
|
||||
{
|
||||
t.Property("DerivativeProductCategories")
|
||||
.HasColumnName("SyntheticEntity_DerivativeProductCategories");
|
||||
});
|
||||
|
||||
b.HasDiscriminator().HasValue("Synthetic");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AssetEntityTagEntity", b =>
|
||||
{
|
||||
b.HasOne("FinlyticCore.Entities.Assets.TagEntity", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("TagsId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FinlyticCore.Entities.Assets.AssetEntity", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("AssetsIsin", "AssetsInstrumentCategory")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user