feat(Fundamentals): add fundamentals service

This commit is contained in:
2026-08-09 21:01:39 +02:00
parent e0778b88ea
commit 605e41cfeb
21 changed files with 3122 additions and 0 deletions
@@ -0,0 +1,443 @@
// <auto-generated />
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<string>("Isin")
.HasColumnType("text");
b.Property<string>("BusinessSummary")
.HasColumnType("text");
b.Property<string>("CompanyName")
.IsRequired()
.HasColumnType("text");
b.Property<string>("ConsensusRating")
.HasColumnType("text");
b.Property<string>("Country")
.HasColumnType("text");
b.Property<int?>("Employees")
.HasColumnType("integer");
b.Property<DateTime?>("ExDividendDate")
.HasColumnType("timestamp with time zone");
b.Property<string>("Industry")
.HasColumnType("text");
b.Property<DateTime>("LastStaticUpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property<DateTime>("LastUpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property<DateTime?>("NextEarningsDate")
.HasColumnType("timestamp with time zone");
b.Property<decimal?>("PercentHeldByInsiders")
.HasColumnType("numeric");
b.Property<decimal?>("PercentHeldByInstitutions")
.HasColumnType("numeric");
b.Property<decimal?>("PriceTargetHigh")
.HasColumnType("numeric");
b.Property<decimal?>("PriceTargetLow")
.HasColumnType("numeric");
b.Property<decimal?>("PriceTargetMean")
.HasColumnType("numeric");
b.Property<decimal?>("PriceTargetMedian")
.HasColumnType("numeric");
b.Property<string>("PrimaryTicker")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Sector")
.HasColumnType("text");
b.Property<decimal?>("ShortPercentOfFloat")
.HasColumnType("numeric");
b.Property<decimal?>("ShortRatio")
.HasColumnType("numeric");
b.HasKey("Isin");
b.HasIndex("PrimaryTicker")
.IsUnique();
b.ToTable("AssetFundamentals");
});
modelBuilder.Entity("FinlyticFundamentals.Entities.CompanyExecutiveEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<int?>("Age")
.HasColumnType("integer");
b.Property<decimal?>("Compensation")
.HasColumnType("numeric");
b.Property<string>("Isin")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Title")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("Isin");
b.ToTable("CompanyExecutives");
});
modelBuilder.Entity("FinlyticFundamentals.Entities.FinancialStatementEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<decimal?>("AccountsReceivable")
.HasColumnType("numeric");
b.Property<decimal?>("CapitalExpenditures")
.HasColumnType("numeric");
b.Property<decimal?>("CashAndCashEquivalents")
.HasColumnType("numeric");
b.Property<decimal?>("CostOfRevenue")
.HasColumnType("numeric");
b.Property<decimal?>("CurrentLiabilities")
.HasColumnType("numeric");
b.Property<decimal?>("Ebitda")
.HasColumnType("numeric");
b.Property<DateTime>("EndDate")
.HasColumnType("timestamp with time zone");
b.Property<decimal?>("EpsBasic")
.HasColumnType("numeric");
b.Property<decimal?>("EpsDiluted")
.HasColumnType("numeric");
b.Property<decimal?>("FinancingCashFlow")
.HasColumnType("numeric");
b.Property<decimal?>("FreeCashFlow")
.HasColumnType("numeric");
b.Property<decimal?>("GrossProfit")
.HasColumnType("numeric");
b.Property<decimal?>("Inventory")
.HasColumnType("numeric");
b.Property<decimal?>("InvestingCashFlow")
.HasColumnType("numeric");
b.Property<string>("Isin")
.IsRequired()
.HasColumnType("text");
b.Property<decimal?>("LongTermDebt")
.HasColumnType("numeric");
b.Property<decimal?>("NetIncome")
.HasColumnType("numeric");
b.Property<decimal?>("OperatingCashFlow")
.HasColumnType("numeric");
b.Property<decimal?>("OperatingExpenses")
.HasColumnType("numeric");
b.Property<decimal?>("OperatingIncome")
.HasColumnType("numeric");
b.Property<string>("PeriodType")
.IsRequired()
.HasColumnType("text");
b.Property<decimal?>("TotalCurrentAssets")
.HasColumnType("numeric");
b.Property<decimal?>("TotalLiabilities")
.HasColumnType("numeric");
b.Property<decimal?>("TotalNonCurrentAssets")
.HasColumnType("numeric");
b.Property<decimal?>("TotalRevenue")
.HasColumnType("numeric");
b.Property<decimal?>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<decimal?>("ExpectedEps")
.HasColumnType("numeric");
b.Property<decimal?>("ExpectedGrowthRate")
.HasColumnType("numeric");
b.Property<decimal?>("ExpectedRevenue")
.HasColumnType("numeric");
b.Property<string>("Isin")
.IsRequired()
.HasColumnType("text");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<int>("CacheTtlHours")
.HasColumnType("integer");
b.Property<bool>("EnableYahooFallback")
.HasColumnType("boolean");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.ToTable("Settings");
});
modelBuilder.Entity("FinlyticFundamentals.Entities.TickerFundamentalsEntity", b =>
{
b.Property<string>("Ticker")
.HasColumnType("text");
b.Property<decimal>("CurrentPrice")
.HasColumnType("numeric");
b.Property<decimal?>("CurrentRatio")
.HasColumnType("numeric");
b.Property<decimal>("DayChangeAbsolute")
.HasColumnType("numeric");
b.Property<decimal>("DayChangePercent")
.HasColumnType("numeric");
b.Property<decimal?>("DebtToEquity")
.HasColumnType("numeric");
b.Property<decimal?>("DividendYield")
.HasColumnType("numeric");
b.Property<decimal>("EnterpriseValue")
.HasColumnType("numeric");
b.Property<decimal?>("EvToEbitda")
.HasColumnType("numeric");
b.Property<decimal?>("EvToRevenue")
.HasColumnType("numeric");
b.Property<DateTime?>("ExDividendDate")
.HasColumnType("timestamp with time zone");
b.Property<string>("Exchange")
.HasColumnType("text");
b.Property<decimal>("FiftyTwoWeekHigh")
.HasColumnType("numeric");
b.Property<decimal>("FiftyTwoWeekLow")
.HasColumnType("numeric");
b.Property<decimal?>("GrossMargin")
.HasColumnType("numeric");
b.Property<decimal?>("InterestCoverage")
.HasColumnType("numeric");
b.Property<string>("Isin")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime>("LastUpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property<decimal>("MarketCapitalization")
.HasColumnType("numeric");
b.Property<decimal?>("NetProfitMargin")
.HasColumnType("numeric");
b.Property<decimal?>("OperatingMargin")
.HasColumnType("numeric");
b.Property<decimal?>("PayoutRatio")
.HasColumnType("numeric");
b.Property<decimal?>("PbRatio")
.HasColumnType("numeric");
b.Property<decimal?>("PeRatioForward")
.HasColumnType("numeric");
b.Property<decimal?>("PeRatioTrailing")
.HasColumnType("numeric");
b.Property<decimal?>("PegRatio")
.HasColumnType("numeric");
b.Property<decimal?>("PsRatio")
.HasColumnType("numeric");
b.Property<decimal?>("QuickRatio")
.HasColumnType("numeric");
b.Property<decimal?>("ReturnOnAssets")
.HasColumnType("numeric");
b.Property<decimal?>("ReturnOnEquity")
.HasColumnType("numeric");
b.Property<decimal?>("ReturnOnInvestedCapital")
.HasColumnType("numeric");
b.Property<string>("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
}
}
}