Init
This commit is contained in:
@@ -0,0 +1,285 @@
|
||||
// <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("20260628184437_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>("AssetsIsin")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("TagsId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("AssetsIsin", "TagsId");
|
||||
|
||||
b.HasIndex("TagsId");
|
||||
|
||||
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<bool>("FinishedInitialScan")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("InitAssetUpdateTypeDelay")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("InitBatchAssetUpdateDelay")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("MaxRandomUpdateDay")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("MinRandomUpdateDay")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("TradeRepublicMaxRequestPageSize")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("UpdateDayTimeStart")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("UpdateDayTimeStop")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Settings");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FinlyticCore.Entities.Assets.AssetEntity", b =>
|
||||
{
|
||||
b.Property<string>("Isin")
|
||||
.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<string>("InstrumentCategory")
|
||||
.IsRequired()
|
||||
.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.Property<DateTime>("UpdateAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.HasKey("Isin");
|
||||
|
||||
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.AssetEntity", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("AssetsIsin")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FinlyticCore.Entities.Assets.TagEntity", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("TagsId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FinlyticAssets.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Init : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Settings",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
FinishedInitialScan = table.Column<bool>(type: "boolean", nullable: false),
|
||||
MinRandomUpdateDay = table.Column<int>(type: "integer", nullable: false),
|
||||
MaxRandomUpdateDay = table.Column<int>(type: "integer", nullable: false),
|
||||
UpdateDayTimeStart = table.Column<int>(type: "integer", nullable: false),
|
||||
UpdateDayTimeStop = table.Column<int>(type: "integer", nullable: false),
|
||||
TradeRepublicMaxRequestPageSize = table.Column<int>(type: "integer", nullable: false),
|
||||
AssetUpdateTypeDelay = table.Column<int>(type: "integer", nullable: false),
|
||||
InitAssetUpdateTypeDelay = table.Column<int>(type: "integer", nullable: false),
|
||||
InitBatchAssetUpdateDelay = table.Column<int>(type: "integer", nullable: false),
|
||||
BatchAssetUpdateDelay = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Settings", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TradeRepublicAssets",
|
||||
columns: table => new
|
||||
{
|
||||
Isin = table.Column<string>(type: "text", nullable: false),
|
||||
Name = table.Column<string>(type: "text", nullable: false),
|
||||
Type = table.Column<string>(type: "text", nullable: false),
|
||||
InstrumentCategory = table.Column<string>(type: "text", nullable: false),
|
||||
HasCfd = table.Column<bool>(type: "boolean", nullable: false),
|
||||
ImageId = table.Column<string>(type: "text", nullable: true),
|
||||
UpdateAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
LastUpdatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
AssetType = table.Column<string>(type: "character varying(13)", maxLength: 13, nullable: false),
|
||||
BondIssuerName = table.Column<string>(type: "text", nullable: true),
|
||||
SearchSubtitle = table.Column<string>(type: "text", nullable: true),
|
||||
Subtitle = table.Column<string>(type: "text", nullable: true),
|
||||
CryptoEntity_SearchSubtitle = table.Column<string>(type: "text", nullable: true),
|
||||
DerivativeProductCategories = table.Column<string>(type: "text", nullable: true),
|
||||
UnderlyingIsin = table.Column<string>(type: "text", nullable: true),
|
||||
EtfEntity_DerivativeProductCategories = table.Column<string>(type: "text", nullable: true),
|
||||
EtfDescription = table.Column<string>(type: "text", nullable: true),
|
||||
MappedEtfIndexName = table.Column<string>(type: "text", nullable: true),
|
||||
EtfEntity_Subtitle = table.Column<string>(type: "text", nullable: true),
|
||||
EtfEntity_SearchSubtitle = table.Column<string>(type: "text", nullable: true),
|
||||
StockEntity_DerivativeProductCategories = table.Column<string>(type: "text", nullable: true),
|
||||
SyntheticEntity_DerivativeProductCategories = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TradeRepublicAssets", x => x.Isin);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TradeRepublicTags",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<string>(type: "text", nullable: false),
|
||||
Name = table.Column<string>(type: "text", nullable: false),
|
||||
Type = table.Column<string>(type: "text", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TradeRepublicTags", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AssetEntityTagEntity",
|
||||
columns: table => new
|
||||
{
|
||||
AssetsIsin = table.Column<string>(type: "text", nullable: false),
|
||||
TagsId = table.Column<string>(type: "text", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AssetEntityTagEntity", x => new { x.AssetsIsin, x.TagsId });
|
||||
table.ForeignKey(
|
||||
name: "FK_AssetEntityTagEntity_TradeRepublicAssets_AssetsIsin",
|
||||
column: x => x.AssetsIsin,
|
||||
principalTable: "TradeRepublicAssets",
|
||||
principalColumn: "Isin",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_AssetEntityTagEntity_TradeRepublicTags_TagsId",
|
||||
column: x => x.TagsId,
|
||||
principalTable: "TradeRepublicTags",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AssetEntityTagEntity_TagsId",
|
||||
table: "AssetEntityTagEntity",
|
||||
column: "TagsId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "AssetEntityTagEntity");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Settings");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TradeRepublicAssets");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TradeRepublicTags");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,293 @@
|
||||
// <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("20260628195842_AddedScannerState")]
|
||||
partial class AddedScannerState
|
||||
{
|
||||
/// <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>("AssetsIsin")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("TagsId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("AssetsIsin", "TagsId");
|
||||
|
||||
b.HasIndex("TagsId");
|
||||
|
||||
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>("MaxRandomUpdateDay")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("MinRandomUpdateDay")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("TradeRepublicMaxRequestPageSize")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("UpdateDayTimeStart")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("UpdateDayTimeStop")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Settings");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FinlyticCore.Entities.Assets.AssetEntity", b =>
|
||||
{
|
||||
b.Property<string>("Isin")
|
||||
.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<string>("InstrumentCategory")
|
||||
.IsRequired()
|
||||
.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.Property<DateTime>("UpdateAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.HasKey("Isin");
|
||||
|
||||
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.AssetEntity", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("AssetsIsin")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FinlyticCore.Entities.Assets.TagEntity", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("TagsId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FinlyticAssets.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddedScannerState : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "CurrentScanningPage",
|
||||
table: "Settings",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "CurrentScanningType",
|
||||
table: "Settings",
|
||||
type: "character varying(50)",
|
||||
maxLength: 50,
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CurrentScanningPage",
|
||||
table: "Settings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CurrentScanningType",
|
||||
table: "Settings");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,295 @@
|
||||
// <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("20260628204647_FixIsinKey")]
|
||||
partial class FixIsinKey
|
||||
{
|
||||
/// <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>("MaxRandomUpdateDay")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("MinRandomUpdateDay")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("TradeRepublicMaxRequestPageSize")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("UpdateDayTimeStart")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("UpdateDayTimeStop")
|
||||
.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.Property<DateTime>("UpdateAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.HasKey("Isin", "InstrumentCategory");
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FinlyticAssets.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class FixIsinKey : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_AssetEntityTagEntity_TradeRepublicAssets_AssetsIsin",
|
||||
table: "AssetEntityTagEntity");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_TradeRepublicAssets",
|
||||
table: "TradeRepublicAssets");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_AssetEntityTagEntity",
|
||||
table: "AssetEntityTagEntity");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_AssetEntityTagEntity_TagsId",
|
||||
table: "AssetEntityTagEntity");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "AssetsInstrumentCategory",
|
||||
table: "AssetEntityTagEntity",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_TradeRepublicAssets",
|
||||
table: "TradeRepublicAssets",
|
||||
columns: new[] { "Isin", "InstrumentCategory" });
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_AssetEntityTagEntity",
|
||||
table: "AssetEntityTagEntity",
|
||||
columns: new[] { "TagsId", "AssetsIsin", "AssetsInstrumentCategory" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AssetEntityTagEntity_AssetsIsin_AssetsInstrumentCategory",
|
||||
table: "AssetEntityTagEntity",
|
||||
columns: new[] { "AssetsIsin", "AssetsInstrumentCategory" });
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_AssetEntityTagEntity_TradeRepublicAssets_AssetsIsin_AssetsI~",
|
||||
table: "AssetEntityTagEntity",
|
||||
columns: new[] { "AssetsIsin", "AssetsInstrumentCategory" },
|
||||
principalTable: "TradeRepublicAssets",
|
||||
principalColumns: new[] { "Isin", "InstrumentCategory" },
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_AssetEntityTagEntity_TradeRepublicAssets_AssetsIsin_AssetsI~",
|
||||
table: "AssetEntityTagEntity");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_TradeRepublicAssets",
|
||||
table: "TradeRepublicAssets");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_AssetEntityTagEntity",
|
||||
table: "AssetEntityTagEntity");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_AssetEntityTagEntity_AssetsIsin_AssetsInstrumentCategory",
|
||||
table: "AssetEntityTagEntity");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "AssetsInstrumentCategory",
|
||||
table: "AssetEntityTagEntity");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_TradeRepublicAssets",
|
||||
table: "TradeRepublicAssets",
|
||||
column: "Isin");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_AssetEntityTagEntity",
|
||||
table: "AssetEntityTagEntity",
|
||||
columns: new[] { "AssetsIsin", "TagsId" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AssetEntityTagEntity_TagsId",
|
||||
table: "AssetEntityTagEntity",
|
||||
column: "TagsId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_AssetEntityTagEntity_TradeRepublicAssets_AssetsIsin",
|
||||
table: "AssetEntityTagEntity",
|
||||
column: "AssetsIsin",
|
||||
principalTable: "TradeRepublicAssets",
|
||||
principalColumn: "Isin",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,292 @@
|
||||
// <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.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>("MaxRandomUpdateDay")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("MinRandomUpdateDay")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("TradeRepublicMaxRequestPageSize")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("UpdateDayTimeStart")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("UpdateDayTimeStop")
|
||||
.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.Property<DateTime>("UpdateAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.HasKey("Isin", "InstrumentCategory");
|
||||
|
||||
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