//
using System;
using FinlyticFundamentals.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace FinlyticFundamentals.Migrations
{
[DbContext(typeof(FundamentalsDbContext))]
partial class FundamentalsDbContextModelSnapshot : 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("FinlyticFundamentals.Entities.AssetFundamentalsEntity", b =>
{
b.Property("Isin")
.HasColumnType("text");
b.Property("BusinessSummary")
.HasColumnType("text");
b.Property("CompanyName")
.IsRequired()
.HasColumnType("text");
b.Property("ConsensusRating")
.HasColumnType("text");
b.Property("Country")
.HasColumnType("text");
b.Property("Employees")
.HasColumnType("integer");
b.Property("ExDividendDate")
.HasColumnType("timestamp with time zone");
b.Property("Industry")
.HasColumnType("text");
b.Property("LastStaticUpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property("LastUpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property("NextEarningsDate")
.HasColumnType("timestamp with time zone");
b.Property("PercentHeldByInsiders")
.HasColumnType("numeric");
b.Property("PercentHeldByInstitutions")
.HasColumnType("numeric");
b.Property("PriceTargetHigh")
.HasColumnType("numeric");
b.Property("PriceTargetLow")
.HasColumnType("numeric");
b.Property("PriceTargetMean")
.HasColumnType("numeric");
b.Property("PriceTargetMedian")
.HasColumnType("numeric");
b.Property("PrimaryTicker")
.IsRequired()
.HasColumnType("text");
b.Property("Sector")
.HasColumnType("text");
b.Property("ShortPercentOfFloat")
.HasColumnType("numeric");
b.Property("ShortRatio")
.HasColumnType("numeric");
b.HasKey("Isin");
b.HasIndex("PrimaryTicker")
.IsUnique();
b.ToTable("AssetFundamentals");
});
modelBuilder.Entity("FinlyticFundamentals.Entities.CompanyExecutiveEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("Age")
.HasColumnType("integer");
b.Property("Compensation")
.HasColumnType("numeric");
b.Property("Isin")
.IsRequired()
.HasColumnType("text");
b.Property("Name")
.IsRequired()
.HasColumnType("text");
b.Property("Title")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("Isin");
b.ToTable("CompanyExecutives");
});
modelBuilder.Entity("FinlyticFundamentals.Entities.FinancialStatementEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("AccountsReceivable")
.HasColumnType("numeric");
b.Property("CapitalExpenditures")
.HasColumnType("numeric");
b.Property("CashAndCashEquivalents")
.HasColumnType("numeric");
b.Property("CostOfRevenue")
.HasColumnType("numeric");
b.Property("CurrentLiabilities")
.HasColumnType("numeric");
b.Property("Ebitda")
.HasColumnType("numeric");
b.Property("EndDate")
.HasColumnType("timestamp with time zone");
b.Property("EpsBasic")
.HasColumnType("numeric");
b.Property("EpsDiluted")
.HasColumnType("numeric");
b.Property("FinancingCashFlow")
.HasColumnType("numeric");
b.Property("FreeCashFlow")
.HasColumnType("numeric");
b.Property("GrossProfit")
.HasColumnType("numeric");
b.Property("Inventory")
.HasColumnType("numeric");
b.Property("InvestingCashFlow")
.HasColumnType("numeric");
b.Property("Isin")
.IsRequired()
.HasColumnType("text");
b.Property("LongTermDebt")
.HasColumnType("numeric");
b.Property("NetIncome")
.HasColumnType("numeric");
b.Property("OperatingCashFlow")
.HasColumnType("numeric");
b.Property("OperatingExpenses")
.HasColumnType("numeric");
b.Property("OperatingIncome")
.HasColumnType("numeric");
b.Property("PeriodType")
.IsRequired()
.HasColumnType("text");
b.Property("TotalCurrentAssets")
.HasColumnType("numeric");
b.Property("TotalLiabilities")
.HasColumnType("numeric");
b.Property("TotalNonCurrentAssets")
.HasColumnType("numeric");
b.Property("TotalRevenue")
.HasColumnType("numeric");
b.Property("TotalStockholdersEquity")
.HasColumnType("numeric");
b.HasKey("Id");
b.HasIndex("Isin");
b.HasIndex("Isin", "PeriodType", "EndDate")
.IsUnique();
b.ToTable("FinancialStatements");
});
modelBuilder.Entity("FinlyticFundamentals.Entities.ForwardEstimateEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("ExpectedEps")
.HasColumnType("numeric");
b.Property("ExpectedGrowthRate")
.HasColumnType("numeric");
b.Property("ExpectedRevenue")
.HasColumnType("numeric");
b.Property("Isin")
.IsRequired()
.HasColumnType("text");
b.Property("Period")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("Isin");
b.HasIndex("Isin", "Period")
.IsUnique();
b.ToTable("ForwardEstimates");
});
modelBuilder.Entity("FinlyticFundamentals.Entities.FundamentalsSettingsEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CacheTtlHours")
.HasColumnType("integer");
b.Property("EnableYahooFallback")
.HasColumnType("boolean");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.ToTable("Settings");
});
modelBuilder.Entity("FinlyticFundamentals.Entities.TickerFundamentalsEntity", b =>
{
b.Property("Ticker")
.HasColumnType("text");
b.Property("CurrentPrice")
.HasColumnType("numeric");
b.Property("CurrentRatio")
.HasColumnType("numeric");
b.Property("DayChangeAbsolute")
.HasColumnType("numeric");
b.Property("DayChangePercent")
.HasColumnType("numeric");
b.Property("DebtToEquity")
.HasColumnType("numeric");
b.Property("DividendYield")
.HasColumnType("numeric");
b.Property("EnterpriseValue")
.HasColumnType("numeric");
b.Property("EvToEbitda")
.HasColumnType("numeric");
b.Property("EvToRevenue")
.HasColumnType("numeric");
b.Property("ExDividendDate")
.HasColumnType("timestamp with time zone");
b.Property("Exchange")
.HasColumnType("text");
b.Property("FiftyTwoWeekHigh")
.HasColumnType("numeric");
b.Property("FiftyTwoWeekLow")
.HasColumnType("numeric");
b.Property("GrossMargin")
.HasColumnType("numeric");
b.Property("InterestCoverage")
.HasColumnType("numeric");
b.Property("Isin")
.IsRequired()
.HasColumnType("text");
b.Property("LastUpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property("MarketCapitalization")
.HasColumnType("numeric");
b.Property("NetProfitMargin")
.HasColumnType("numeric");
b.Property("OperatingMargin")
.HasColumnType("numeric");
b.Property("PayoutRatio")
.HasColumnType("numeric");
b.Property("PbRatio")
.HasColumnType("numeric");
b.Property("PeRatioForward")
.HasColumnType("numeric");
b.Property("PeRatioTrailing")
.HasColumnType("numeric");
b.Property("PegRatio")
.HasColumnType("numeric");
b.Property("PsRatio")
.HasColumnType("numeric");
b.Property("QuickRatio")
.HasColumnType("numeric");
b.Property("ReturnOnAssets")
.HasColumnType("numeric");
b.Property("ReturnOnEquity")
.HasColumnType("numeric");
b.Property("ReturnOnInvestedCapital")
.HasColumnType("numeric");
b.Property("TradingCurrency")
.HasColumnType("text");
b.HasKey("Ticker");
b.HasIndex("Isin");
b.ToTable("TickerFundamentals");
});
modelBuilder.Entity("FinlyticFundamentals.Entities.CompanyExecutiveEntity", b =>
{
b.HasOne("FinlyticFundamentals.Entities.AssetFundamentalsEntity", "AssetFundamentals")
.WithMany("Executives")
.HasForeignKey("Isin")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("AssetFundamentals");
});
modelBuilder.Entity("FinlyticFundamentals.Entities.FinancialStatementEntity", b =>
{
b.HasOne("FinlyticFundamentals.Entities.AssetFundamentalsEntity", "AssetFundamentals")
.WithMany("FinancialStatements")
.HasForeignKey("Isin")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("AssetFundamentals");
});
modelBuilder.Entity("FinlyticFundamentals.Entities.ForwardEstimateEntity", b =>
{
b.HasOne("FinlyticFundamentals.Entities.AssetFundamentalsEntity", "AssetFundamentals")
.WithMany("Estimates")
.HasForeignKey("Isin")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("AssetFundamentals");
});
modelBuilder.Entity("FinlyticFundamentals.Entities.TickerFundamentalsEntity", b =>
{
b.HasOne("FinlyticFundamentals.Entities.AssetFundamentalsEntity", "AssetFundamentals")
.WithMany("TickerFundamentals")
.HasForeignKey("Isin")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("AssetFundamentals");
});
modelBuilder.Entity("FinlyticFundamentals.Entities.AssetFundamentalsEntity", b =>
{
b.Navigation("Estimates");
b.Navigation("Executives");
b.Navigation("FinancialStatements");
b.Navigation("TickerFundamentals");
});
#pragma warning restore 612, 618
}
}
}