364 lines
13 KiB
C#
364 lines
13 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using FinlyticAssets.Database;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace FinlyticAssets.Migrations
|
|
{
|
|
[DbContext(typeof(AssetsDbContext))]
|
|
partial class AssetsDbContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(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.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("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("FinlyticAssets.Entities.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.Settings.SettingEntity", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Key")
|
|
.IsRequired()
|
|
.HasMaxLength(150)
|
|
.HasColumnType("character varying(150)");
|
|
|
|
b.Property<DateTime>("LastUpdatedUtc")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("ServiceIdentifier")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("character varying(100)");
|
|
|
|
b.Property<string>("ValueJson")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Key")
|
|
.IsUnique();
|
|
|
|
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");
|
|
|
|
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("FinlyticAssets.Entities.StockEntity", b =>
|
|
{
|
|
b.HasBaseType("FinlyticAssets.Entities.AssetEntity");
|
|
|
|
b.Property<string>("DerivativeProductCategories")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.ToTable("TradeRepublicAssets", t =>
|
|
{
|
|
t.Property("DerivativeProductCategories")
|
|
.HasColumnName("StockEntity_DerivativeProductCategories");
|
|
});
|
|
|
|
b.HasDiscriminator().HasValue("Stock");
|
|
});
|
|
|
|
modelBuilder.Entity("FinlyticAssets.Entities.SyntheticEntity", b =>
|
|
{
|
|
b.HasBaseType("FinlyticAssets.Entities.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("FinlyticAssets.Entities.TagEntity", null)
|
|
.WithMany()
|
|
.HasForeignKey("TagsId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("FinlyticAssets.Entities.AssetEntity", null)
|
|
.WithMany()
|
|
.HasForeignKey("AssetsIsin", "AssetsInstrumentCategory")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|