// 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("FinlyticCore.Entities.Settings.SettingEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Key") .IsRequired() .HasMaxLength(150) .HasColumnType("character varying(150)"); b.Property("LastUpdatedUtc") .HasColumnType("timestamp with time zone"); b.Property("ServiceIdentifier") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)"); b.Property("ValueJson") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("Key") .IsUnique(); b.ToTable("DynamicSettings"); }); modelBuilder.Entity("FinlyticFundamentals.Entities.AssetDataEntity", b => { b.Property("Isin") .HasColumnType("text"); b.Property("Description") .IsRequired() .HasColumnType("text"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.HasKey("Isin"); b.ToTable("AssetData"); }); modelBuilder.Entity("FinlyticFundamentals.Entities.AssetEventEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("AssetDataIsin") .IsRequired() .HasColumnType("text"); b.Property("Date") .HasColumnType("timestamp with time zone"); b.Property("Type") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("AssetDataIsin"); b.ToTable("AssetEvents"); }); modelBuilder.Entity("FinlyticFundamentals.Entities.FundamentalDataEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("AssetDataIsin") .IsRequired() .HasColumnType("text"); b.Property("ConsensusRating") .HasColumnType("text"); b.Property("CurrentRatio") .HasColumnType("numeric"); b.Property("DebtToEquity") .HasColumnType("numeric"); b.Property("DilutedEps") .HasColumnType("numeric"); b.Property("Ebitda") .HasColumnType("numeric"); b.Property("EnterpriseValue") .HasColumnType("numeric"); b.Property("EvToEbitda") .HasColumnType("numeric"); b.Property("FiftyTwoWeekHigh") .HasColumnType("numeric"); b.Property("FiftyTwoWeekLow") .HasColumnType("numeric"); b.Property("ForwardDividendYield") .HasColumnType("numeric"); b.Property("ForwardPe") .HasColumnType("numeric"); b.Property("FreeCashFlow") .HasColumnType("numeric"); b.Property("GrossProfit") .HasColumnType("numeric"); b.Property("LastUpdatedUtc") .HasColumnType("timestamp with time zone"); b.Property("MarketCap") .HasColumnType("numeric"); b.Property("NetIncome") .HasColumnType("numeric"); b.Property("OperatingCashFlow") .HasColumnType("numeric"); b.Property("OperatingIncome") .HasColumnType("numeric"); b.Property("PayoutRatio") .HasColumnType("numeric"); b.Property("PegRatio") .HasColumnType("numeric"); 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("PriceToBook") .HasColumnType("numeric"); b.Property("PriceToSales") .HasColumnType("numeric"); b.Property("ReturnOnAssets") .HasColumnType("numeric"); b.Property("ReturnOnEquity") .HasColumnType("numeric"); b.Property("RevenueGrowthYoY") .HasColumnType("numeric"); b.Property("ShortPercentOfFloat") .HasColumnType("numeric"); b.Property("ShortRatio") .HasColumnType("numeric"); b.Property("TotalCash") .HasColumnType("numeric"); b.Property("TotalDebt") .HasColumnType("numeric"); b.Property("TotalRevenue") .HasColumnType("numeric"); b.Property("TrailingPe") .HasColumnType("numeric"); b.HasKey("Id"); b.HasIndex("AssetDataIsin"); b.ToTable("FundamentalData"); }); modelBuilder.Entity("FinlyticFundamentals.Entities.KeyExecutiveEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("AssetDataIsin") .IsRequired() .HasColumnType("text"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("Payment") .IsRequired() .HasColumnType("text"); b.Property("SortOrder") .ValueGeneratedOnAdd() .HasColumnType("integer") .HasDefaultValue(0); b.Property("Title") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("AssetDataIsin", "SortOrder"); b.ToTable("KeyExecutives"); }); modelBuilder.Entity("FinlyticFundamentals.Entities.AssetDataEntity", b => { b.OwnsOne("FinlyticFundamentals.Entities.TickerEntity", "PrimaryTicker", b1 => { b1.Property("AssetDataEntityIsin") .HasColumnType("text"); b1.Property("Exchange") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("") .HasColumnName("PrimaryTickerExchange"); b1.Property("Ticker") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("") .HasColumnName("PrimaryTicker"); b1.HasKey("AssetDataEntityIsin"); b1.ToTable("AssetData"); b1.WithOwner() .HasForeignKey("AssetDataEntityIsin"); }); b.OwnsMany("FinlyticFundamentals.Entities.TickerEntity", "AvailableTickers", b1 => { b1.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b1.Property("AssetDataIsin") .IsRequired() .HasColumnType("text"); b1.Property("Exchange") .IsRequired() .HasColumnType("text") .HasColumnName("Exchange"); b1.Property("Ticker") .IsRequired() .HasColumnType("text") .HasColumnName("Ticker"); b1.HasKey("Id"); b1.HasIndex("AssetDataIsin"); b1.HasIndex("Ticker"); b1.ToTable("Tickers", (string)null); b1.WithOwner() .HasForeignKey("AssetDataIsin"); }); b.Navigation("AvailableTickers"); b.Navigation("PrimaryTicker") .IsRequired(); }); modelBuilder.Entity("FinlyticFundamentals.Entities.AssetEventEntity", b => { b.HasOne("FinlyticFundamentals.Entities.AssetDataEntity", "AssetData") .WithMany("AssetEvents") .HasForeignKey("AssetDataIsin") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.OwnsOne("FinlyticFundamentals.Entities.TickerEntity", "Ticker", b1 => { b1.Property("AssetEventEntityId") .HasColumnType("uuid"); b1.Property("Exchange") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("") .HasColumnName("TickerExchange"); b1.Property("Ticker") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("") .HasColumnName("Ticker"); b1.HasKey("AssetEventEntityId"); b1.ToTable("AssetEvents"); b1.WithOwner() .HasForeignKey("AssetEventEntityId"); }); b.Navigation("AssetData"); b.Navigation("Ticker") .IsRequired(); }); modelBuilder.Entity("FinlyticFundamentals.Entities.FundamentalDataEntity", b => { b.HasOne("FinlyticFundamentals.Entities.AssetDataEntity", "AssetData") .WithMany("FundamentalData") .HasForeignKey("AssetDataIsin") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.OwnsOne("FinlyticFundamentals.Entities.TickerEntity", "Ticker", b1 => { b1.Property("FundamentalDataEntityId") .HasColumnType("uuid"); b1.Property("Exchange") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("") .HasColumnName("TickerExchange"); b1.Property("Ticker") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("") .HasColumnName("Ticker"); b1.HasKey("FundamentalDataEntityId"); b1.HasIndex("Ticker"); b1.ToTable("FundamentalData"); b1.WithOwner() .HasForeignKey("FundamentalDataEntityId"); }); b.Navigation("AssetData"); b.Navigation("Ticker") .IsRequired(); }); modelBuilder.Entity("FinlyticFundamentals.Entities.KeyExecutiveEntity", b => { b.HasOne("FinlyticFundamentals.Entities.AssetDataEntity", "AssetData") .WithMany("KeyExecutives") .HasForeignKey("AssetDataIsin") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("AssetData"); }); modelBuilder.Entity("FinlyticFundamentals.Entities.AssetDataEntity", b => { b.Navigation("AssetEvents"); b.Navigation("FundamentalData"); b.Navigation("KeyExecutives"); }); #pragma warning restore 612, 618 } } }