From f3c0aaec1aedae953c4a5522e2f9798ecd0e8e82 Mon Sep 17 00:00:00 2001 From: Kovus Date: Mon, 25 Oct 2021 15:03:00 -0500 Subject: [PATCH] Add indexes of timestamps (since we filter on them) --- Database/Models/ChatModel.cs | 3 + ...11025200131_ChatMessageIndexes.Designer.cs | 5022 +++++++++++++++++ .../20211025200131_ChatMessageIndexes.cs | 31 + .../PostgresDataContextModelSnapshot.cs | 4 + ...11025200122_ChatMessageIndexes.Designer.cs | 4931 ++++++++++++++++ .../20211025200122_ChatMessageIndexes.cs | 31 + .../SqliteDataContextModelSnapshot.cs | 4 + 7 files changed, 10026 insertions(+) create mode 100644 Migrations/PostgresMigrations/20211025200131_ChatMessageIndexes.Designer.cs create mode 100644 Migrations/PostgresMigrations/20211025200131_ChatMessageIndexes.cs create mode 100644 Migrations/SqliteMigrations/20211025200122_ChatMessageIndexes.Designer.cs create mode 100644 Migrations/SqliteMigrations/20211025200122_ChatMessageIndexes.cs diff --git a/Database/Models/ChatModel.cs b/Database/Models/ChatModel.cs index 3996a00..14329d7 100644 --- a/Database/Models/ChatModel.cs +++ b/Database/Models/ChatModel.cs @@ -37,6 +37,9 @@ namespace FIORest.Database.Models public virtual List Messages { get; set; } = new List(); } + [Microsoft.EntityFrameworkCore.Index(nameof(ChatModelId))] + [Microsoft.EntityFrameworkCore.Index(nameof(Timestamp))] + [Microsoft.EntityFrameworkCore.Index(nameof(MessageTimestamp))] public class ChatMessage { [DatabaseGenerated(DatabaseGeneratedOption.None)] diff --git a/Migrations/PostgresMigrations/20211025200131_ChatMessageIndexes.Designer.cs b/Migrations/PostgresMigrations/20211025200131_ChatMessageIndexes.Designer.cs new file mode 100644 index 0000000..2474cdc --- /dev/null +++ b/Migrations/PostgresMigrations/20211025200131_ChatMessageIndexes.Designer.cs @@ -0,0 +1,5022 @@ +// +using System; +using FIORest.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +namespace FIORest.Migrations.PostgresMigrations +{ + [DbContext(typeof(PostgresDataContext))] + [Migration("20211025200131_ChatMessageIndexes")] + partial class ChatMessageIndexes + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .UseIdentityByDefaultColumns() + .HasAnnotation("Relational:MaxIdentifierLength", 63) + .HasAnnotation("ProductVersion", "5.0.7"); + + modelBuilder.Entity("FIORest.Database.Models.APIKey", b => + { + b.Property("APIKeyId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("AllowWrites") + .HasColumnType("boolean"); + + b.Property("Application") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("AuthAPIKey") + .HasColumnType("uuid"); + + b.Property("AuthenticationModelId") + .HasColumnType("integer"); + + b.Property("LastAccessTime") + .HasColumnType("timestamp without time zone"); + + b.HasKey("APIKeyId"); + + b.HasIndex("AuthenticationModelId"); + + b.ToTable("APIKeys"); + }); + + modelBuilder.Entity("FIORest.Database.Models.AuthenticationModel", b => + { + b.Property("AuthenticationModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("AccountEnabled") + .HasColumnType("boolean"); + + b.Property("AuthorizationExpiry") + .HasColumnType("timestamp without time zone"); + + b.Property("AuthorizationKey") + .HasColumnType("uuid"); + + b.Property("DisabledReason") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("IsAdministrator") + .HasColumnType("boolean"); + + b.Property("PasswordHash") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("UserName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("AuthenticationModelId"); + + b.ToTable("AuthenticationModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BUIBuildingCost", b => + { + b.Property("BUIBuildingCostId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Amount") + .HasColumnType("integer"); + + b.Property("BUIModelId") + .HasColumnType("integer"); + + b.Property("CommodityName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("CommodityTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("Volume") + .HasColumnType("double precision"); + + b.Property("Weight") + .HasColumnType("double precision"); + + b.HasKey("BUIBuildingCostId"); + + b.HasIndex("BUIModelId"); + + b.ToTable("BUIBuildingCosts"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BUIModel", b => + { + b.Property("BUIModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("AreaCost") + .HasColumnType("integer"); + + b.Property("Engineers") + .HasColumnType("integer"); + + b.Property("Expertise") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Pioneers") + .HasColumnType("integer"); + + b.Property("Scientists") + .HasColumnType("integer"); + + b.Property("Settlers") + .HasColumnType("integer"); + + b.Property("Technicians") + .HasColumnType("integer"); + + b.Property("Ticker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("BUIModelId"); + + b.ToTable("BUIModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BUIRecipe", b => + { + b.Property("BUIRecipeId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("BUIModelId") + .HasColumnType("integer"); + + b.Property("DurationMs") + .HasColumnType("integer"); + + b.Property("RecipeName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.HasKey("BUIRecipeId"); + + b.HasIndex("BUIModelId"); + + b.ToTable("BUIRecipes"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BUIRecipeInput", b => + { + b.Property("BUIRecipeInputId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Amount") + .HasColumnType("integer"); + + b.Property("BUIRecipeId") + .HasColumnType("integer"); + + b.Property("CommodityName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("CommodityTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("Volume") + .HasColumnType("double precision"); + + b.Property("Weight") + .HasColumnType("double precision"); + + b.HasKey("BUIRecipeInputId"); + + b.HasIndex("BUIRecipeId"); + + b.ToTable("BUIRecipeInputs"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BUIRecipeOutput", b => + { + b.Property("BUIRecipeOutputId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Amount") + .HasColumnType("integer"); + + b.Property("BUIRecipeId") + .HasColumnType("integer"); + + b.Property("CommodityName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("CommodityTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("Volume") + .HasColumnType("double precision"); + + b.Property("Weight") + .HasColumnType("double precision"); + + b.HasKey("BUIRecipeOutputId"); + + b.HasIndex("BUIRecipeId"); + + b.ToTable("BUIRecipeOutputs"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BuildingDegradationModel", b => + { + b.Property("BuildingDegradationModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("BuildingCreated") + .HasColumnType("bigint"); + + b.Property("BuildingTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("Condition") + .HasColumnType("double precision"); + + b.Property("DaysSinceLastRepair") + .HasColumnType("double precision"); + + b.Property("HasBeenRepaired") + .HasColumnType("boolean"); + + b.HasKey("BuildingDegradationModelId"); + + b.HasIndex("BuildingTicker", "DaysSinceLastRepair", "HasBeenRepaired") + .IsUnique(); + + b.ToTable("BuildingDegradationModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BuildingDegradationReclaimableMaterialModel", b => + { + b.Property("BuildingDegradationReclaimableMaterialModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("BuildingDegradationModelId") + .HasColumnType("integer"); + + b.Property("MaterialCount") + .HasColumnType("integer"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.HasKey("BuildingDegradationReclaimableMaterialModelId"); + + b.HasIndex("BuildingDegradationModelId", "MaterialTicker") + .IsUnique(); + + b.ToTable("BuildingDegradationReclaimableMaterialModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BuildingDegradationRepairMaterialModel", b => + { + b.Property("BuildingDegradationRepairMaterialModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("BuildingDegradationModelId") + .HasColumnType("integer"); + + b.Property("MaterialCount") + .HasColumnType("integer"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.HasKey("BuildingDegradationRepairMaterialModelId"); + + b.HasIndex("BuildingDegradationModelId", "MaterialTicker") + .IsUnique(); + + b.ToTable("BuildingDegradationRepairMaterialModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BuyingAd", b => + { + b.Property("BuyingAdId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("ContractNaturalId") + .HasColumnType("integer"); + + b.Property("CreationTimeEpochMs") + .HasColumnType("bigint"); + + b.Property("CreatorCompanyCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("CreatorCompanyId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CreatorCompanyName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("DeliveryTime") + .HasColumnType("integer"); + + b.Property("ExpiryTimeEpochMs") + .HasColumnType("bigint"); + + b.Property("LocalMarketModelId") + .HasColumnType("integer"); + + b.Property("MaterialAmount") + .HasColumnType("integer"); + + b.Property("MaterialCategory") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("MaterialVolume") + .HasColumnType("double precision"); + + b.Property("MaterialWeight") + .HasColumnType("double precision"); + + b.Property("MinimumRating") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("PlanetId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("PlanetName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("PlanetNaturalId") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("Price") + .HasColumnType("double precision"); + + b.Property("PriceCurrency") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.HasKey("BuyingAdId"); + + b.HasIndex("LocalMarketModelId"); + + b.ToTable("BuyingAds"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXBuyOrder", b => + { + b.Property("OrderId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CXDataModelId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CompanyCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("CompanyId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CompanyName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ItemCost") + .HasColumnType("double precision"); + + b.Property("ItemCount") + .HasColumnType("integer"); + + b.HasKey("OrderId"); + + b.HasIndex("CXDataModelId"); + + b.HasIndex("OrderId"); + + b.HasIndex("OrderId", "CXDataModelId") + .IsUnique(); + + b.ToTable("CXBuyOrders"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXDataModel", b => + { + b.Property("CXDataModelId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("AllTimeHigh") + .HasColumnType("double precision"); + + b.Property("AllTimeLow") + .HasColumnType("double precision"); + + b.Property("Ask") + .HasColumnType("double precision"); + + b.Property("AskCount") + .HasColumnType("integer"); + + b.Property("Bid") + .HasColumnType("double precision"); + + b.Property("BidCount") + .HasColumnType("integer"); + + b.Property("Currency") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("Demand") + .HasColumnType("integer"); + + b.Property("ExchangeCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("ExchangeName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("High") + .HasColumnType("double precision"); + + b.Property("Low") + .HasColumnType("double precision"); + + b.Property("MMBuy") + .HasColumnType("double precision"); + + b.Property("MMSell") + .HasColumnType("double precision"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("NarrowPriceBandHigh") + .HasColumnType("double precision"); + + b.Property("NarrowPriceBandLow") + .HasColumnType("double precision"); + + b.Property("Previous") + .HasColumnType("double precision"); + + b.Property("Price") + .HasColumnType("double precision"); + + b.Property("PriceAverage") + .HasColumnType("double precision"); + + b.Property("PriceTimeEpochMs") + .HasColumnType("bigint"); + + b.Property("Supply") + .HasColumnType("integer"); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("Traded") + .HasColumnType("integer"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("VolumeAmount") + .HasColumnType("double precision"); + + b.Property("WidePriceBandHigh") + .HasColumnType("double precision"); + + b.Property("WidePriceBandLow") + .HasColumnType("double precision"); + + b.HasKey("CXDataModelId"); + + b.HasIndex("ExchangeCode"); + + b.HasIndex("MaterialId"); + + b.HasIndex("MaterialName"); + + b.HasIndex("MaterialTicker"); + + b.HasIndex("ExchangeCode", "MaterialId") + .IsUnique(); + + b.ToTable("CXDataModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXOSTrade", b => + { + b.Property("CXOSTradeId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Amount") + .HasColumnType("integer"); + + b.Property("CXOSTradeOrderId") + .HasColumnType("integer"); + + b.Property("PartnerCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("PartnerId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("PartnerName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Price") + .HasColumnType("double precision"); + + b.Property("PriceCurrency") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("TradeId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("TradeTimeEpochMs") + .HasColumnType("bigint"); + + b.HasKey("CXOSTradeId"); + + b.HasIndex("CXOSTradeOrderId"); + + b.ToTable("CXOSTrades"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXOSTradeOrder", b => + { + b.Property("CXOSTradeOrderId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Amount") + .HasColumnType("integer"); + + b.Property("BrokerId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CXOSTradeOrdersModelId") + .HasColumnType("integer"); + + b.Property("CreatedEpochMs") + .HasColumnType("bigint"); + + b.Property("ExchangeCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("ExchangeName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("InitialAmount") + .HasColumnType("integer"); + + b.Property("Limit") + .HasColumnType("double precision"); + + b.Property("LimitCurrency") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("OrderType") + .HasMaxLength(16) + .HasColumnType("character varying(16)"); + + b.Property("Status") + .HasMaxLength(16) + .HasColumnType("character varying(16)"); + + b.Property("TradeOrderId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("CXOSTradeOrderId"); + + b.HasIndex("CXOSTradeOrdersModelId"); + + b.ToTable("CXOSTradeOrders"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXOSTradeOrdersModel", b => + { + b.Property("CXOSTradeOrdersModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("CXOSTradeOrdersModelId"); + + b.ToTable("CXOSTradeOrderModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXPCData", b => + { + b.Property("CXPCDataId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("EndDataEpochMs") + .HasColumnType("bigint"); + + b.Property("ExchangeCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("StartDataEpochMs") + .HasColumnType("bigint"); + + b.HasKey("CXPCDataId"); + + b.ToTable("CXPCData"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXPCDataEntry", b => + { + b.Property("CXPCDataEntryId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("CXPCDataId") + .HasColumnType("integer"); + + b.Property("Close") + .HasColumnType("double precision"); + + b.Property("Open") + .HasColumnType("double precision"); + + b.Property("TimeEpochMs") + .HasColumnType("bigint"); + + b.Property("Traded") + .HasColumnType("integer"); + + b.Property("Volume") + .HasColumnType("double precision"); + + b.HasKey("CXPCDataEntryId"); + + b.HasIndex("CXPCDataId"); + + b.ToTable("CXPCDataEntries"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXSellOrder", b => + { + b.Property("OrderId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CXDataModelId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CompanyCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("CompanyId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CompanyName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ItemCost") + .HasColumnType("double precision"); + + b.Property("ItemCount") + .HasColumnType("integer"); + + b.HasKey("OrderId"); + + b.HasIndex("CXDataModelId"); + + b.HasIndex("OrderId"); + + b.HasIndex("OrderId", "CXDataModelId") + .IsUnique(); + + b.ToTable("CXSellOrders"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ChatMessage", b => + { + b.Property("MessageId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("ChatModelId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MessageDeleted") + .HasColumnType("boolean"); + + b.Property("MessageText") + .HasColumnType("text"); + + b.Property("MessageTimestamp") + .HasColumnType("bigint"); + + b.Property("MessageType") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("SenderId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("UserName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("MessageId"); + + b.HasIndex("ChatModelId"); + + b.HasIndex("MessageTimestamp"); + + b.HasIndex("Timestamp"); + + b.ToTable("ChatMessages"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ChatModel", b => + { + b.Property("ChannelId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CreationTime") + .HasColumnType("bigint"); + + b.Property("DisplayName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("LastActivity") + .HasColumnType("bigint"); + + b.Property("NaturalId") + .HasMaxLength(16) + .HasColumnType("character varying(16)"); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("Type") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("UserCount") + .HasColumnType("integer"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("ChannelId"); + + b.ToTable("ChatModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ComexExchange", b => + { + b.Property("ComexExchangeId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("CurrencyCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("CurrencyDecimals") + .HasColumnType("integer"); + + b.Property("CurrencyName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CurrencyNumericCode") + .HasColumnType("integer"); + + b.Property("ExchangeCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("ExchangeId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("ExchangeName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ExchangeOperatorCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("ExchangeOperatorId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("ExchangeOperatorName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("LocationId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("LocationName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("LocationNaturalId") + .HasMaxLength(16) + .HasColumnType("character varying(16)"); + + b.HasKey("ComexExchangeId"); + + b.ToTable("ComexExchanges"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CompanyDataCurrencyBalance", b => + { + b.Property("CompanyDataCurrencyBalanceId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Balance") + .HasColumnType("double precision"); + + b.Property("CompanyDataModelId") + .HasColumnType("integer"); + + b.Property("Currency") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.HasKey("CompanyDataCurrencyBalanceId"); + + b.HasIndex("CompanyDataModelId"); + + b.ToTable("CompanyDataCurrencyBalances"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CompanyDataModel", b => + { + b.Property("CompanyDataModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("ActivityRating") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("CompanyCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("CompanyId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CompanyName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("CountryId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CreatedEpochMs") + .HasColumnType("bigint"); + + b.Property("CurrencyCode") + .HasMaxLength(4) + .HasColumnType("character varying(4)"); + + b.Property("HighestTier") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("OverallRating") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("Pioneer") + .HasColumnType("boolean"); + + b.Property("ReliabilityRating") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("StabilityRating") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("StartingLocation") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("StartingProfile") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Team") + .HasColumnType("boolean"); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("UserName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("CompanyDataModelId"); + + b.HasIndex("CompanyId") + .IsUnique(); + + b.HasIndex("UserName"); + + b.ToTable("CompanyDataModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ContractCondition", b => + { + b.Property("ContractConditionId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Address") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Amount") + .HasColumnType("double precision"); + + b.Property("BlockId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("ConditionId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("ConditionIndex") + .HasColumnType("integer"); + + b.Property("ContractModelId") + .HasColumnType("integer"); + + b.Property("Currency") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("DeadlineEpochMs") + .HasColumnType("bigint"); + + b.Property("Destination") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MaterialAmount") + .HasColumnType("integer"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("Party") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("PickedUpAmount") + .HasColumnType("integer"); + + b.Property("PickedUpMaterialId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("PickedUpMaterialTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("ShipmentItemId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Status") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Type") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Volume") + .HasColumnType("double precision"); + + b.Property("Weight") + .HasColumnType("double precision"); + + b.HasKey("ContractConditionId"); + + b.HasIndex("ContractModelId"); + + b.ToTable("ContractConditions"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ContractDependency", b => + { + b.Property("ContractDependencyId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("ContractConditionId") + .HasColumnType("integer"); + + b.Property("Dependency") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("ContractDependencyId"); + + b.HasIndex("ContractConditionId"); + + b.ToTable("ContractDependencies"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ContractModel", b => + { + b.Property("ContractModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("CanExtend") + .HasColumnType("boolean"); + + b.Property("ContractId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("ContractLocalId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("DateEpochMs") + .HasColumnType("bigint"); + + b.Property("DueDateEpochMs") + .HasColumnType("bigint"); + + b.Property("ExtensionDeadlineEpochMs") + .HasColumnType("bigint"); + + b.Property("PartnerCompanyCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("PartnerId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("PartnerName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Party") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Status") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("ContractModelId"); + + b.ToTable("ContractModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CountryRegistryCountry", b => + { + b.Property("CountryRegistryCountryId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("CountryCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("CountryId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CountryName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("CurrencyCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("CurrencyDecimals") + .HasColumnType("integer"); + + b.Property("CurrencyName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CurrencyNumericCode") + .HasColumnType("integer"); + + b.HasKey("CountryRegistryCountryId"); + + b.ToTable("CountryRegistryCountries"); + }); + + modelBuilder.Entity("FIORest.Database.Models.DestinationLine", b => + { + b.Property("DestinationLineId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("FLIGHTSFlightSegmentId") + .HasColumnType("integer"); + + b.Property("LineId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("LineName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("LineNaturalId") + .HasMaxLength(16) + .HasColumnType("character varying(16)"); + + b.Property("Type") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("DestinationLineId"); + + b.HasIndex("FLIGHTSFlightSegmentId"); + + b.ToTable("FLIGHTSDestinationLines"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ExpertsModel", b => + { + b.Property("ExpertsModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("AgricultureActive") + .HasColumnType("integer"); + + b.Property("AgricultureAvailable") + .HasColumnType("integer"); + + b.Property("AgricultureEfficiencyGain") + .HasColumnType("double precision"); + + b.Property("ChemistryActive") + .HasColumnType("integer"); + + b.Property("ChemistryAvailable") + .HasColumnType("integer"); + + b.Property("ChemistryEfficiencyGain") + .HasColumnType("double precision"); + + b.Property("ConstructionActive") + .HasColumnType("integer"); + + b.Property("ConstructionAvailable") + .HasColumnType("integer"); + + b.Property("ConstructionEfficiencyGain") + .HasColumnType("double precision"); + + b.Property("ElectronicsActive") + .HasColumnType("integer"); + + b.Property("ElectronicsAvailable") + .HasColumnType("integer"); + + b.Property("ElectronicsEfficiencyGain") + .HasColumnType("double precision"); + + b.Property("FoodIndustriesActive") + .HasColumnType("integer"); + + b.Property("FoodIndustriesAvailable") + .HasColumnType("integer"); + + b.Property("FoodIndustriesEfficiencyGain") + .HasColumnType("double precision"); + + b.Property("FuelRefiningActive") + .HasColumnType("integer"); + + b.Property("FuelRefiningAvailable") + .HasColumnType("integer"); + + b.Property("FuelRefiningEfficiencyGain") + .HasColumnType("double precision"); + + b.Property("ManufacturingActive") + .HasColumnType("integer"); + + b.Property("ManufacturingAvailable") + .HasColumnType("integer"); + + b.Property("ManufacturingEfficiencyGain") + .HasColumnType("double precision"); + + b.Property("MetallurgyActive") + .HasColumnType("integer"); + + b.Property("MetallurgyAvailable") + .HasColumnType("integer"); + + b.Property("MetallurgyEfficiencyGain") + .HasColumnType("double precision"); + + b.Property("PlanetId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("ResourceExtractionAvailable") + .HasColumnType("integer"); + + b.Property("ResourceExtractionEfficiencyGain") + .HasColumnType("double precision"); + + b.Property("ResourceExtractioneActive") + .HasColumnType("integer"); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("ExpertsModelId"); + + b.ToTable("ExpertModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.FLIGHTSFlight", b => + { + b.Property("FLIGHTSFlightId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("ArrivalTimeEpochMs") + .HasColumnType("bigint"); + + b.Property("CurrentSegmentIndex") + .HasColumnType("integer"); + + b.Property("DepartureTimeEpochMs") + .HasColumnType("bigint"); + + b.Property("Destination") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("FLIGHTSModelId") + .HasColumnType("integer"); + + b.Property("FlightId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("FtlDistance") + .HasColumnType("double precision"); + + b.Property("IsAborted") + .HasColumnType("boolean"); + + b.Property("Origin") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ShipId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("StlDistance") + .HasColumnType("double precision"); + + b.HasKey("FLIGHTSFlightId"); + + b.HasIndex("FLIGHTSModelId"); + + b.ToTable("FLIGHTSFlights"); + }); + + modelBuilder.Entity("FIORest.Database.Models.FLIGHTSFlightSegment", b => + { + b.Property("FLIGHTSFlightSegmentId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("ArrivalTimeEpochMs") + .HasColumnType("bigint"); + + b.Property("DepartureTimeEpochMs") + .HasColumnType("bigint"); + + b.Property("Destination") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("FLIGHTSFlightId") + .HasColumnType("integer"); + + b.Property("FtlDistance") + .HasColumnType("double precision"); + + b.Property("FtlFuelConsumption") + .HasColumnType("double precision"); + + b.Property("Origin") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("StlDistance") + .HasColumnType("double precision"); + + b.Property("StlFuelConsumption") + .HasColumnType("double precision"); + + b.Property("Type") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("FLIGHTSFlightSegmentId"); + + b.HasIndex("FLIGHTSFlightId"); + + b.ToTable("FLIGHTSFlightSegments"); + }); + + modelBuilder.Entity("FIORest.Database.Models.FLIGHTSModel", b => + { + b.Property("FLIGHTSModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("FLIGHTSModelId"); + + b.ToTable("FLIGHTSModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.FXDataModel", b => + { + b.Property("FXDataModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("BaseCurrencyCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("BaseCurrencyName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("BaseCurrencyNumericCode") + .HasColumnType("integer"); + + b.Property("BrokerId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("High") + .HasColumnType("numeric"); + + b.Property("Low") + .HasColumnType("numeric"); + + b.Property("Open") + .HasColumnType("numeric"); + + b.Property("Previous") + .HasColumnType("numeric"); + + b.Property("PriceUpdateEpochMs") + .HasColumnType("bigint"); + + b.Property("QuoteCurrencyCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("QuoteCurrencyName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("QuoteCurrencyNumericCode") + .HasColumnType("integer"); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("Traded") + .HasColumnType("numeric"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Volume") + .HasColumnType("numeric"); + + b.HasKey("FXDataModelId"); + + b.ToTable("FXDataModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.FailedLoginAttempt", b => + { + b.Property("FailedLoginAttemptId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Address") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("AuthenticationModelId") + .HasColumnType("integer"); + + b.Property("FailedAttemptDateTime") + .HasColumnType("timestamp without time zone"); + + b.HasKey("FailedLoginAttemptId"); + + b.HasIndex("AuthenticationModelId"); + + b.ToTable("FailedLoginAttempts"); + }); + + modelBuilder.Entity("FIORest.Database.Models.GroupModel", b => + { + b.Property("GroupModelId") + .HasColumnType("integer"); + + b.Property("GroupName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("GroupOwner") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("GroupModelId"); + + b.ToTable("GroupModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.GroupUserEntryModel", b => + { + b.Property("GroupUserEntryModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("GroupModelId") + .HasColumnType("integer"); + + b.Property("GroupUserName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("GroupUserEntryModelId"); + + b.HasIndex("GroupModelId"); + + b.ToTable("GroupUserEntryModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureInfo", b => + { + b.Property("InfrastructureInfoId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("ActiveLevel") + .HasColumnType("integer"); + + b.Property("CurrentLevel") + .HasColumnType("integer"); + + b.Property("InfrastructureModelId") + .HasColumnType("integer"); + + b.Property("Level") + .HasColumnType("integer"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProjectId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Ticker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("Type") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("UpgradeStatus") + .HasColumnType("double precision"); + + b.Property("UpkeepStatus") + .HasColumnType("double precision"); + + b.HasKey("InfrastructureInfoId"); + + b.HasIndex("InfrastructureModelId"); + + b.ToTable("InfrastructureInfos"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureModel", b => + { + b.Property("InfrastructureModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("PopulationId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("InfrastructureModelId"); + + b.ToTable("InfrastructureModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureProjectContributions", b => + { + b.Property("InfrastructureProjectContributionsId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Amount") + .HasColumnType("integer"); + + b.Property("CompanyCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("CompanyId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CompanyName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("InfrastructureInfoId") + .HasColumnType("integer"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("TimestampEpochMs") + .HasColumnType("bigint"); + + b.HasKey("InfrastructureProjectContributionsId"); + + b.HasIndex("InfrastructureInfoId"); + + b.ToTable("InfrastructureProjectContributions"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureProjectUpgradeCosts", b => + { + b.Property("InfrastructureProjectUpgradeCostsId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Amount") + .HasColumnType("integer"); + + b.Property("CurrentAmount") + .HasColumnType("integer"); + + b.Property("InfrastructureInfoId") + .HasColumnType("integer"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.HasKey("InfrastructureProjectUpgradeCostsId"); + + b.HasIndex("InfrastructureInfoId"); + + b.ToTable("InfrastructureProjectUpgradeCosts"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureProjectUpkeeps", b => + { + b.Property("InfrastructureProjectUpkeepsId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Amount") + .HasColumnType("integer"); + + b.Property("CurrentAmount") + .HasColumnType("integer"); + + b.Property("Duration") + .HasColumnType("integer"); + + b.Property("InfrastructureInfoId") + .HasColumnType("integer"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("NextTickTimestampEpochMs") + .HasColumnType("bigint"); + + b.Property("StoreCapacity") + .HasColumnType("integer"); + + b.Property("Stored") + .HasColumnType("integer"); + + b.HasKey("InfrastructureProjectUpkeepsId"); + + b.HasIndex("InfrastructureInfoId"); + + b.ToTable("InfrastructureProjectUpkeeps"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureReport", b => + { + b.Property("InfrastructureReportId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("AverageHappinessEngineer") + .HasColumnType("real"); + + b.Property("AverageHappinessPioneer") + .HasColumnType("real"); + + b.Property("AverageHappinessScientist") + .HasColumnType("real"); + + b.Property("AverageHappinessSettler") + .HasColumnType("real"); + + b.Property("AverageHappinessTechnician") + .HasColumnType("real"); + + b.Property("ExplorersGraceEnabled") + .HasColumnType("boolean"); + + b.Property("InfrastructureModelId") + .HasColumnType("integer"); + + b.Property("NeedFulfillmentComfort") + .HasColumnType("real"); + + b.Property("NeedFulfillmentCulture") + .HasColumnType("real"); + + b.Property("NeedFulfillmentEducation") + .HasColumnType("real"); + + b.Property("NeedFulfillmentHealth") + .HasColumnType("real"); + + b.Property("NeedFulfillmentLifeSupport") + .HasColumnType("real"); + + b.Property("NeedFulfillmentSafety") + .HasColumnType("real"); + + b.Property("NextPopulationEngineer") + .HasColumnType("integer"); + + b.Property("NextPopulationPioneer") + .HasColumnType("integer"); + + b.Property("NextPopulationScientist") + .HasColumnType("integer"); + + b.Property("NextPopulationSettler") + .HasColumnType("integer"); + + b.Property("NextPopulationTechnician") + .HasColumnType("integer"); + + b.Property("OpenJobsEngineer") + .HasColumnType("real"); + + b.Property("OpenJobsPioneer") + .HasColumnType("real"); + + b.Property("OpenJobsScientist") + .HasColumnType("real"); + + b.Property("OpenJobsSettler") + .HasColumnType("real"); + + b.Property("OpenJobsTechnician") + .HasColumnType("real"); + + b.Property("PopulationDifferenceEngineer") + .HasColumnType("integer"); + + b.Property("PopulationDifferencePioneer") + .HasColumnType("integer"); + + b.Property("PopulationDifferenceScientist") + .HasColumnType("integer"); + + b.Property("PopulationDifferenceSettler") + .HasColumnType("integer"); + + b.Property("PopulationDifferenceTechnician") + .HasColumnType("integer"); + + b.Property("SimulationPeriod") + .HasColumnType("integer"); + + b.Property("TimestampMs") + .HasColumnType("bigint"); + + b.Property("UnemploymentRateEngineer") + .HasColumnType("real"); + + b.Property("UnemploymentRatePioneer") + .HasColumnType("real"); + + b.Property("UnemploymentRateScientist") + .HasColumnType("real"); + + b.Property("UnemploymentRateSettler") + .HasColumnType("real"); + + b.Property("UnemploymentRateTechnician") + .HasColumnType("real"); + + b.HasKey("InfrastructureReportId"); + + b.HasIndex("InfrastructureModelId"); + + b.ToTable("InfrastructureModelReports"); + }); + + modelBuilder.Entity("FIORest.Database.Models.JumpCacheModel", b => + { + b.Property("JumpCacheModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("DestinationNaturalId") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("DestinationSystemId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("DestinationSystemName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("JumpCount") + .HasColumnType("integer"); + + b.Property("OverallDistance") + .HasColumnType("double precision"); + + b.Property("SourceSystemId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("SourceSystemName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("SourceSystemNaturalId") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.HasKey("JumpCacheModelId"); + + b.ToTable("JumpCacheModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.JumpCacheRouteJump", b => + { + b.Property("JumpCacheRouteJumpId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("DestinationNaturalId") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("DestinationSystemId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("DestinationSystemName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Distance") + .HasColumnType("double precision"); + + b.Property("JumpCacheModelId") + .HasColumnType("integer"); + + b.Property("SourceSystemId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("SourceSystemName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("SourceSystemNaturalId") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.HasKey("JumpCacheRouteJumpId"); + + b.HasIndex("JumpCacheModelId"); + + b.ToTable("JumpCacheRoutes"); + }); + + modelBuilder.Entity("FIORest.Database.Models.LocalMarketModel", b => + { + b.Property("LocalMarketModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("MarketId") + .HasColumnType("text"); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("LocalMarketModelId"); + + b.ToTable("LocalMarketModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.MATModel", b => + { + b.Property("MATModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("CategoryId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CategoryName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MatId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Ticker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Volume") + .HasColumnType("double precision"); + + b.Property("Weight") + .HasColumnType("double precision"); + + b.HasKey("MATModelId"); + + b.ToTable("MATModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.OriginLine", b => + { + b.Property("OriginLineId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("FLIGHTSFlightSegmentId") + .HasColumnType("integer"); + + b.Property("LineId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("LineName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("LineNaturalId") + .HasMaxLength(16) + .HasColumnType("character varying(16)"); + + b.Property("Type") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("OriginLineId"); + + b.HasIndex("FLIGHTSFlightSegmentId"); + + b.ToTable("FLIGHTSOriginLines"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PRODLinesModel", b => + { + b.Property("PRODLinesModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("SiteId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("PRODLinesModelId"); + + b.ToTable("PRODLinesModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PermissionAllowance", b => + { + b.Property("PermissionAllowanceId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("AuthenticationModelId") + .HasColumnType("integer"); + + b.Property("BuildingData") + .HasColumnType("boolean"); + + b.Property("ContractData") + .HasColumnType("boolean"); + + b.Property("ExpertsData") + .HasColumnType("boolean"); + + b.Property("FlightData") + .HasColumnType("boolean"); + + b.Property("ProductionData") + .HasColumnType("boolean"); + + b.Property("ShipmentTrackingData") + .HasColumnType("boolean"); + + b.Property("StorageData") + .HasColumnType("boolean"); + + b.Property("UserName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("WorkforceData") + .HasColumnType("boolean"); + + b.HasKey("PermissionAllowanceId"); + + b.HasIndex("AuthenticationModelId"); + + b.ToTable("PermissionAllowances"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetBuildRequirement", b => + { + b.Property("PlanetBuildRequirementId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("MaterialAmount") + .HasColumnType("integer"); + + b.Property("MaterialCategory") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("MaterialVolume") + .HasColumnType("double precision"); + + b.Property("MaterialWeight") + .HasColumnType("double precision"); + + b.Property("PlanetDataModelId") + .HasColumnType("integer"); + + b.HasKey("PlanetBuildRequirementId"); + + b.HasIndex("PlanetDataModelId"); + + b.ToTable("PlanetBuildRequirements"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetCOGCProgram", b => + { + b.Property("PlanetCOGCProgramId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("EndEpochMs") + .HasColumnType("bigint"); + + b.Property("PlanetDataModelId") + .HasColumnType("integer"); + + b.Property("ProgramType") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("StartEpochMs") + .HasColumnType("bigint"); + + b.HasKey("PlanetCOGCProgramId"); + + b.HasIndex("PlanetDataModelId"); + + b.ToTable("PlanetCOGCPrograms"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetCOGCUpkeep", b => + { + b.Property("PlanetCOGCUpkeepId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("CurrentAmount") + .HasColumnType("integer"); + + b.Property("DueDateEpochMs") + .HasColumnType("bigint"); + + b.Property("MaterialAmount") + .HasColumnType("integer"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("MaterialVolume") + .HasColumnType("double precision"); + + b.Property("MaterialWeight") + .HasColumnType("double precision"); + + b.Property("PlanetDataModelId") + .HasColumnType("integer"); + + b.HasKey("PlanetCOGCUpkeepId"); + + b.HasIndex("PlanetDataModelId"); + + b.ToTable("PlanetCOGCUpkeep"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetCOGCVote", b => + { + b.Property("PlanetCOGCVoteId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("CompanyCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("CompanyName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Influence") + .HasColumnType("real"); + + b.Property("PlanetDataModelId") + .HasColumnType("integer"); + + b.Property("VoteTimeEpochMs") + .HasColumnType("bigint"); + + b.Property("VoteType") + .HasColumnType("text"); + + b.HasKey("PlanetCOGCVoteId"); + + b.HasIndex("PlanetDataModelId"); + + b.ToTable("PlanetCOGCVotes"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetDataModel", b => + { + b.Property("PlanetDataModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("BaseLocalMarketFee") + .HasColumnType("double precision"); + + b.Property("COGCProgramStatus") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CollectorCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("CollectorId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CollectorName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("CurrencyCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("CurrencyName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("FactionCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("FactionName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Fertility") + .HasColumnType("double precision"); + + b.Property("GovernorCorporationCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("GovernorCorporationId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("GovernorCorporationName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("GovernorId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("GovernorUserName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Gravity") + .HasColumnType("double precision"); + + b.Property("HasAdministrationCenter") + .HasColumnType("boolean"); + + b.Property("HasChamberOfCommerce") + .HasColumnType("boolean"); + + b.Property("HasLocalMarket") + .HasColumnType("boolean"); + + b.Property("HasShipyard") + .HasColumnType("boolean"); + + b.Property("HasWarehouse") + .HasColumnType("boolean"); + + b.Property("LocalMarketFeeFactor") + .HasColumnType("double precision"); + + b.Property("MagneticField") + .HasColumnType("double precision"); + + b.Property("Mass") + .HasColumnType("double precision"); + + b.Property("MassEarth") + .HasColumnType("double precision"); + + b.Property("Nameable") + .HasColumnType("boolean"); + + b.Property("Namer") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("NamingDataEpochMs") + .HasColumnType("bigint"); + + b.Property("OrbitEccentricity") + .HasColumnType("double precision"); + + b.Property("OrbitInclination") + .HasColumnType("double precision"); + + b.Property("OrbitIndex") + .HasColumnType("integer"); + + b.Property("OrbitPeriapsis") + .HasColumnType("double precision"); + + b.Property("OrbitRightAscension") + .HasColumnType("double precision"); + + b.Property("OrbitSemiMajorAxis") + .HasColumnType("double precision"); + + b.Property("PlanetId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("PlanetName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("PlanetNaturalId") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("PlanetTier") + .HasColumnType("integer"); + + b.Property("PopulationId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Pressure") + .HasColumnType("double precision"); + + b.Property("Radiation") + .HasColumnType("double precision"); + + b.Property("Radius") + .HasColumnType("double precision"); + + b.Property("Sunlight") + .HasColumnType("double precision"); + + b.Property("Surface") + .HasColumnType("boolean"); + + b.Property("SystemId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Temperature") + .HasColumnType("double precision"); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("WarehouseFee") + .HasColumnType("double precision"); + + b.HasKey("PlanetDataModelId"); + + b.ToTable("PlanetDataModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetDataResource", b => + { + b.Property("PlanetDataResourceId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Factor") + .HasColumnType("double precision"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("PlanetDataModelId") + .HasColumnType("integer"); + + b.Property("ResourceType") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("PlanetDataResourceId"); + + b.HasIndex("PlanetDataModelId"); + + b.ToTable("PlanetDataResources"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetProductionFee", b => + { + b.Property("PlanetProductionFeeId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Category") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("FeeAmount") + .HasColumnType("double precision"); + + b.Property("FeeCurrency") + .HasColumnType("text"); + + b.Property("PlanetDataModelId") + .HasColumnType("integer"); + + b.HasKey("PlanetProductionFeeId"); + + b.HasIndex("PlanetDataModelId"); + + b.ToTable("PlanetProductionFees"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetSite", b => + { + b.Property("PlanetSiteId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("OwnerCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("OwnerId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("OwnerName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("PlanetId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("PlotId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("PlotNumber") + .HasColumnType("integer"); + + b.Property("SiteId") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.HasKey("PlanetSiteId"); + + b.ToTable("PlanetSites"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PriceIndexModel", b => + { + b.Property("PriceIndexModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("PriceIndexLabel") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("PriceIndexValue") + .HasColumnType("double precision"); + + b.Property("TimeStamp") + .HasColumnType("timestamp without time zone"); + + b.HasKey("PriceIndexModelId"); + + b.ToTable("PriceIndexModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ProductionLine", b => + { + b.Property("ProductionLineId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Capacity") + .HasColumnType("integer"); + + b.Property("Condition") + .HasColumnType("double precision"); + + b.Property("Efficiency") + .HasColumnType("double precision"); + + b.Property("LineId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("PRODLinesModelId") + .HasColumnType("integer"); + + b.Property("PlanetId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("PlanetName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("PlanetNaturalId") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("SiteId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Type") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("ProductionLineId"); + + b.HasIndex("PRODLinesModelId"); + + b.ToTable("ProductionLines"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ProductionLineInput", b => + { + b.Property("ProductionLineInputId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("MaterialAmount") + .HasColumnType("integer"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("ProductionLineOrderId") + .HasColumnType("integer"); + + b.HasKey("ProductionLineInputId"); + + b.HasIndex("ProductionLineOrderId"); + + b.ToTable("ProductionLineInputs"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ProductionLineOrder", b => + { + b.Property("ProductionLineOrderId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("CompletedPercentage") + .HasColumnType("double precision"); + + b.Property("CompletionEpochMs") + .HasColumnType("bigint"); + + b.Property("CreatedEpochMs") + .HasColumnType("bigint"); + + b.Property("DurationMs") + .HasColumnType("bigint"); + + b.Property("IsHalted") + .HasColumnType("boolean"); + + b.Property("LastUpdatedEpochMs") + .HasColumnType("bigint"); + + b.Property("ProductionFee") + .HasColumnType("double precision"); + + b.Property("ProductionFeeCollectorCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("ProductionFeeCollectorId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("ProductionFeeCollectorName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProductionFeeCurrency") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("ProductionId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("ProductionLineId") + .HasColumnType("integer"); + + b.Property("Recurring") + .HasColumnType("boolean"); + + b.Property("StartedEpochMs") + .HasColumnType("bigint"); + + b.HasKey("ProductionLineOrderId"); + + b.HasIndex("ProductionLineId"); + + b.ToTable("ProductionLineOrders"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ProductionLineOutput", b => + { + b.Property("ProductionLineOutputId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("MaterialAmount") + .HasColumnType("integer"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("ProductionLineOrderId") + .HasColumnType("integer"); + + b.HasKey("ProductionLineOutputId"); + + b.HasIndex("ProductionLineOrderId"); + + b.ToTable("ProductionLineOutputs"); + }); + + modelBuilder.Entity("FIORest.Database.Models.Registration", b => + { + b.Property("RegistrationId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("RegistrationGuid") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("RegistrationTime") + .HasColumnType("timestamp without time zone"); + + b.Property("UserName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("RegistrationId"); + + b.ToTable("Registrations"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SHIPSModel", b => + { + b.Property("SHIPSModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("SHIPSModelId"); + + b.ToTable("SHIPSModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SHIPSRepairMaterial", b => + { + b.Property("SHIPSRepairMaterialId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Amount") + .HasColumnType("integer"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("SHIPSShipId") + .HasColumnType("integer"); + + b.HasKey("SHIPSRepairMaterialId"); + + b.HasIndex("SHIPSShipId"); + + b.ToTable("SHIPSRepairMaterial"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SHIPSShip", b => + { + b.Property("SHIPSShipId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Acceleration") + .HasColumnType("double precision"); + + b.Property("BlueprintNaturalId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CommissioningTimeEpochMs") + .HasColumnType("bigint"); + + b.Property("Condition") + .HasColumnType("double precision"); + + b.Property("EmitterPower") + .HasColumnType("double precision"); + + b.Property("FlightId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("FtlFuelStoreId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("LastRepairEpochMs") + .HasColumnType("bigint"); + + b.Property("Location") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Mass") + .HasColumnType("double precision"); + + b.Property("Name") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("OperatingEmptyMass") + .HasColumnType("double precision"); + + b.Property("ReactorPower") + .HasColumnType("double precision"); + + b.Property("Registration") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("SHIPSModelId") + .HasColumnType("integer"); + + b.Property("ShipId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("StlFuelFlowRate") + .HasColumnType("double precision"); + + b.Property("StlFuelStoreId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("StoreId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Thrust") + .HasColumnType("double precision"); + + b.Property("Volume") + .HasColumnType("double precision"); + + b.HasKey("SHIPSShipId"); + + b.HasIndex("SHIPSModelId"); + + b.ToTable("SHIPSShips"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESBuilding", b => + { + b.Property("SITESBuildingId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("BuildingCreated") + .HasColumnType("bigint"); + + b.Property("BuildingId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("BuildingLastRepair") + .HasColumnType("bigint"); + + b.Property("BuildingName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("BuildingTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("Condition") + .HasColumnType("double precision"); + + b.Property("SITESSiteId") + .HasColumnType("integer"); + + b.HasKey("SITESBuildingId"); + + b.HasIndex("SITESSiteId"); + + b.ToTable("SITESBuildings"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESModel", b => + { + b.Property("SITESModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("SITESModelId"); + + b.ToTable("SITESModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESReclaimableMaterial", b => + { + b.Property("SITESReclaimableMaterialId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("MaterialAmount") + .HasColumnType("integer"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("SITESBuildingId") + .HasColumnType("integer"); + + b.HasKey("SITESReclaimableMaterialId"); + + b.HasIndex("SITESBuildingId"); + + b.ToTable("SITESReclaimableMaterials"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESRepairMaterial", b => + { + b.Property("SITESRepairMaterialId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("MaterialAmount") + .HasColumnType("integer"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("SITESBuildingId") + .HasColumnType("integer"); + + b.HasKey("SITESRepairMaterialId"); + + b.HasIndex("SITESBuildingId"); + + b.ToTable("SITESRepairMaterials"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESSite", b => + { + b.Property("SITESSiteId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("InvestedPermits") + .HasColumnType("integer"); + + b.Property("MaximumPermits") + .HasColumnType("integer"); + + b.Property("PlanetFoundedEpochMs") + .HasColumnType("bigint"); + + b.Property("PlanetId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("PlanetIdentifier") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("PlanetName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("SITESModelId") + .HasColumnType("integer"); + + b.Property("SiteId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("SITESSiteId"); + + b.HasIndex("SITESModelId"); + + b.ToTable("SITESSites"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SellingAd", b => + { + b.Property("SellingAdId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("ContractNaturalId") + .HasColumnType("integer"); + + b.Property("CreationTimeEpochMs") + .HasColumnType("bigint"); + + b.Property("CreatorCompanyCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("CreatorCompanyId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CreatorCompanyName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("DeliveryTime") + .HasColumnType("integer"); + + b.Property("ExpiryTimeEpochMs") + .HasColumnType("bigint"); + + b.Property("LocalMarketModelId") + .HasColumnType("integer"); + + b.Property("MaterialAmount") + .HasColumnType("integer"); + + b.Property("MaterialCategory") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("MaterialVolume") + .HasColumnType("double precision"); + + b.Property("MaterialWeight") + .HasColumnType("double precision"); + + b.Property("MinimumRating") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("PlanetId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("PlanetName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("PlanetNaturalId") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("Price") + .HasColumnType("double precision"); + + b.Property("PriceCurrency") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.HasKey("SellingAdId"); + + b.HasIndex("LocalMarketModelId"); + + b.ToTable("SellingAds"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ShippingAd", b => + { + b.Property("ShippingAdId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("CargoVolume") + .HasColumnType("double precision"); + + b.Property("CargoWeight") + .HasColumnType("double precision"); + + b.Property("ContractNaturalId") + .HasColumnType("integer"); + + b.Property("CreationTimeEpochMs") + .HasColumnType("bigint"); + + b.Property("CreatorCompanyCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("CreatorCompanyId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CreatorCompanyName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("DeliveryTime") + .HasColumnType("integer"); + + b.Property("DestinationPlanetId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("DestinationPlanetName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("DestinationPlanetNaturalId") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("ExpiryTimeEpochMs") + .HasColumnType("bigint"); + + b.Property("LocalMarketModelId") + .HasColumnType("integer"); + + b.Property("MinimumRating") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("OriginPlanetId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("OriginPlanetName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("OriginPlanetNaturalId") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("PayoutCurrency") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("PayoutPrice") + .HasColumnType("double precision"); + + b.Property("PlanetId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("PlanetName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("PlanetNaturalId") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.HasKey("ShippingAdId"); + + b.HasIndex("LocalMarketModelId"); + + b.ToTable("ShippingAds"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SimulationData", b => + { + b.Property("SimulationDataId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("FlightFTLFactor") + .HasColumnType("integer"); + + b.Property("FlightSTLFactor") + .HasColumnType("integer"); + + b.Property("ParsecLength") + .HasColumnType("integer"); + + b.Property("PlanetaryMotionFactor") + .HasColumnType("integer"); + + b.Property("SimulationInterval") + .HasColumnType("integer"); + + b.HasKey("SimulationDataId"); + + b.ToTable("SimulationData"); + }); + + modelBuilder.Entity("FIORest.Database.Models.Station", b => + { + b.Property("StationId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("ComexCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("ComexId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("ComexName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("CommisionTimeEpochMs") + .HasColumnType("bigint"); + + b.Property("CountryCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("CountryId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CountryName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("CurrencyCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("CurrencyDecimals") + .HasColumnType("integer"); + + b.Property("CurrencyName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CurrencyNumericCode") + .HasColumnType("integer"); + + b.Property("GovernorCorporationCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("GovernorCorporationId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("GovernorCorporationName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("GovernorId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("GovernorUserName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("NaturalId") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("SystemId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("SystemName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("SystemNaturalId") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("WarehouseId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("StationId"); + + b.ToTable("Stations"); + }); + + modelBuilder.Entity("FIORest.Database.Models.StorageItem", b => + { + b.Property("StorageItemId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("MaterialAmount") + .HasColumnType("integer"); + + b.Property("MaterialCategory") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("MaterialValue") + .HasColumnType("real"); + + b.Property("MaterialValueCurrency") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("MaterialVolume") + .HasColumnType("double precision"); + + b.Property("MaterialWeight") + .HasColumnType("double precision"); + + b.Property("StorageModelId") + .HasColumnType("integer"); + + b.Property("TotalVolume") + .HasColumnType("double precision"); + + b.Property("TotalWeight") + .HasColumnType("double precision"); + + b.Property("Type") + .HasMaxLength(16) + .HasColumnType("character varying(16)"); + + b.HasKey("StorageItemId"); + + b.HasIndex("StorageModelId"); + + b.ToTable("StorageItems"); + }); + + modelBuilder.Entity("FIORest.Database.Models.StorageModel", b => + { + b.Property("StorageModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("AddressableId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("FixedStore") + .HasColumnType("boolean"); + + b.Property("Name") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("StorageId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("Type") + .HasMaxLength(16) + .HasColumnType("character varying(16)"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("VolumeCapacity") + .HasColumnType("double precision"); + + b.Property("VolumeLoad") + .HasColumnType("double precision"); + + b.Property("WeightCapacity") + .HasColumnType("double precision"); + + b.Property("WeightLoad") + .HasColumnType("double precision"); + + b.HasKey("StorageModelId"); + + b.ToTable("StorageModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SubSector", b => + { + b.Property("SubSectorId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("SSId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("WorldSectorsModelId") + .HasColumnType("integer"); + + b.HasKey("SubSectorId"); + + b.HasIndex("WorldSectorsModelId"); + + b.ToTable("SubSectors"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SubSectorVertex", b => + { + b.Property("SubSectorVertexId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("SubSectorId") + .HasColumnType("integer"); + + b.Property("X") + .HasColumnType("double precision"); + + b.Property("Y") + .HasColumnType("double precision"); + + b.Property("Z") + .HasColumnType("double precision"); + + b.HasKey("SubSectorVertexId"); + + b.HasIndex("SubSectorId"); + + b.ToTable("SubSectorVertices"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SystemConnection", b => + { + b.Property("SystemConnectionId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Connection") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("SystemStarsModelId") + .HasColumnType("integer"); + + b.HasKey("SystemConnectionId"); + + b.HasIndex("SystemStarsModelId"); + + b.ToTable("SystemConnections"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SystemStar", b => + { + b.Property("SystemStarId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Luminosity") + .HasColumnType("double precision"); + + b.Property("Mass") + .HasColumnType("double precision"); + + b.Property("MassSol") + .HasColumnType("double precision"); + + b.Property("PositionX") + .HasColumnType("double precision"); + + b.Property("PositionY") + .HasColumnType("double precision"); + + b.Property("PositionZ") + .HasColumnType("double precision"); + + b.Property("SectorId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("SubSectorId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("SystemId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("SystemName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("SystemNaturalId") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("Type") + .HasMaxLength(16) + .HasColumnType("character varying(16)"); + + b.HasKey("SystemStarId"); + + b.ToTable("SystemStars"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SystemStarsModel", b => + { + b.Property("SystemStarsModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Name") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("NaturalId") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("PositionX") + .HasColumnType("double precision"); + + b.Property("PositionY") + .HasColumnType("double precision"); + + b.Property("PositionZ") + .HasColumnType("double precision"); + + b.Property("SectorId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("SubSectorId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("SystemId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("Type") + .HasMaxLength(16) + .HasColumnType("character varying(16)"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("SystemStarsModelId"); + + b.ToTable("SystemStarsModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.UserDataModel", b => + { + b.Property("UserDataModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("CompanyId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("CreatedEpochMs") + .HasColumnType("bigint"); + + b.Property("IsModeratorChat") + .HasColumnType("boolean"); + + b.Property("IsPayingUser") + .HasColumnType("boolean"); + + b.Property("Pioneer") + .HasColumnType("boolean"); + + b.Property("PlanetNamingRights") + .HasColumnType("integer"); + + b.Property("SystemNamingRights") + .HasColumnType("integer"); + + b.Property("Team") + .HasColumnType("boolean"); + + b.Property("Tier") + .HasMaxLength(16) + .HasColumnType("character varying(16)"); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("UserName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("UserDataModelId"); + + b.ToTable("UserDataModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.UserSettingsBurnRate", b => + { + b.Property("UserSettingsBurnRateId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("PlanetNaturalId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("UserSettingsModelId") + .HasColumnType("integer"); + + b.HasKey("UserSettingsBurnRateId"); + + b.HasIndex("UserSettingsModelId"); + + b.ToTable("UserSettingsBurnRates"); + }); + + modelBuilder.Entity("FIORest.Database.Models.UserSettingsBurnRateExclusion", b => + { + b.Property("UserSettingsBurnRateExclusionId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("UserSettingsBurnRateId") + .HasColumnType("integer"); + + b.HasKey("UserSettingsBurnRateExclusionId"); + + b.HasIndex("UserSettingsBurnRateId"); + + b.ToTable("UserSettingsBurnRateExclusions"); + }); + + modelBuilder.Entity("FIORest.Database.Models.UserSettingsModel", b => + { + b.Property("UserSettingsModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("UserName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("UserSettingsModelId"); + + b.ToTable("UserSettingsModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WarehouseModel", b => + { + b.Property("WarehouseModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("FeeAmount") + .HasColumnType("double precision"); + + b.Property("FeeCollectorCode") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("FeeCollectorId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("FeeCollectorName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("FeeCurrency") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("LocationName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("LocationNaturalId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("NextPaymentTimestampEpochMs") + .HasColumnType("bigint"); + + b.Property("StoreId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("Units") + .HasColumnType("integer"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("VolumeCapacity") + .HasColumnType("double precision"); + + b.Property("WarehouseId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("WeightCapacity") + .HasColumnType("double precision"); + + b.HasKey("WarehouseModelId"); + + b.ToTable("WarehouseModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorkforceDescription", b => + { + b.Property("WorkforceDescriptionId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Capacity") + .HasColumnType("integer"); + + b.Property("Population") + .HasColumnType("integer"); + + b.Property("Required") + .HasColumnType("integer"); + + b.Property("Reserve") + .HasColumnType("integer"); + + b.Property("Satisfaction") + .HasColumnType("double precision"); + + b.Property("WorkforceModelId") + .HasColumnType("integer"); + + b.Property("WorkforceTypeName") + .HasMaxLength(16) + .HasColumnType("character varying(16)"); + + b.HasKey("WorkforceDescriptionId"); + + b.HasIndex("WorkforceModelId"); + + b.ToTable("WorkforceDescriptions"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorkforceModel", b => + { + b.Property("WorkforceModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("LastWorkforceUpdateTime") + .HasColumnType("timestamp without time zone"); + + b.Property("PlanetId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("PlanetName") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("PlanetNaturalId") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("SiteId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("WorkforceModelId"); + + b.ToTable("WorkforceModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorkforceNeed", b => + { + b.Property("WorkforceNeedId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Category") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Essential") + .HasColumnType("boolean"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("Satisfaction") + .HasColumnType("double precision"); + + b.Property("UnitsPerInterval") + .HasColumnType("double precision"); + + b.Property("UnitsPerOneHundred") + .HasColumnType("double precision"); + + b.Property("WorkforceDescriptionId") + .HasColumnType("integer"); + + b.HasKey("WorkforceNeedId"); + + b.HasIndex("WorkforceDescriptionId"); + + b.ToTable("WorkforceNeeds"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorkforcePerOneHundred", b => + { + b.Property("WorkforcePerOneHundredId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("WorkforceType") + .HasMaxLength(16) + .HasColumnType("character varying(16)"); + + b.HasKey("WorkforcePerOneHundredId"); + + b.ToTable("WorkforcePerOneHundreds"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorkforcePerOneHundreedNeed", b => + { + b.Property("WorkforcePerOneHundreedNeedId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("Amount") + .HasColumnType("double precision"); + + b.Property("MaterialCategory") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("character varying(8)"); + + b.Property("WorkforcePerOneHundredId") + .HasColumnType("integer"); + + b.HasKey("WorkforcePerOneHundreedNeedId"); + + b.HasIndex("WorkforcePerOneHundredId"); + + b.ToTable("WorkforcePerOneHundredNeeds"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorldSectorsModel", b => + { + b.Property("WorldSectorsModelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("HexQ") + .HasColumnType("integer"); + + b.Property("HexR") + .HasColumnType("integer"); + + b.Property("HexS") + .HasColumnType("integer"); + + b.Property("Name") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("SectorId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("Size") + .HasColumnType("integer"); + + b.Property("Timestamp") + .HasColumnType("timestamp without time zone"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.HasKey("WorldSectorsModelId"); + + b.ToTable("WorldSectorsModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.APIKey", b => + { + b.HasOne("FIORest.Database.Models.AuthenticationModel", "AuthenticationModel") + .WithMany("APIKeys") + .HasForeignKey("AuthenticationModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AuthenticationModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BUIBuildingCost", b => + { + b.HasOne("FIORest.Database.Models.BUIModel", "BuidModel") + .WithMany("BuildingCosts") + .HasForeignKey("BUIModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BuidModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BUIRecipe", b => + { + b.HasOne("FIORest.Database.Models.BUIModel", "BUIModel") + .WithMany("Recipes") + .HasForeignKey("BUIModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BUIModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BUIRecipeInput", b => + { + b.HasOne("FIORest.Database.Models.BUIRecipe", "BUIRecipe") + .WithMany("Inputs") + .HasForeignKey("BUIRecipeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BUIRecipe"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BUIRecipeOutput", b => + { + b.HasOne("FIORest.Database.Models.BUIRecipe", "BUIRecipe") + .WithMany("Outputs") + .HasForeignKey("BUIRecipeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BUIRecipe"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BuildingDegradationReclaimableMaterialModel", b => + { + b.HasOne("FIORest.Database.Models.BuildingDegradationModel", "BuildingDegradationModel") + .WithMany("ReclaimableMaterials") + .HasForeignKey("BuildingDegradationModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BuildingDegradationModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BuildingDegradationRepairMaterialModel", b => + { + b.HasOne("FIORest.Database.Models.BuildingDegradationModel", "BuildingDegradationModel") + .WithMany("RepairMaterials") + .HasForeignKey("BuildingDegradationModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BuildingDegradationModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BuyingAd", b => + { + b.HasOne("FIORest.Database.Models.LocalMarketModel", "LocalMarketModel") + .WithMany("BuyingAds") + .HasForeignKey("LocalMarketModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("LocalMarketModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXBuyOrder", b => + { + b.HasOne("FIORest.Database.Models.CXDataModel", "CXDataModel") + .WithMany("BuyingOrders") + .HasForeignKey("CXDataModelId"); + + b.Navigation("CXDataModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXOSTrade", b => + { + b.HasOne("FIORest.Database.Models.CXOSTradeOrder", "CXOSTradeOrder") + .WithMany("Trades") + .HasForeignKey("CXOSTradeOrderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CXOSTradeOrder"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXOSTradeOrder", b => + { + b.HasOne("FIORest.Database.Models.CXOSTradeOrdersModel", "CXOSTradeOrdersModel") + .WithMany("TradeOrders") + .HasForeignKey("CXOSTradeOrdersModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CXOSTradeOrdersModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXPCDataEntry", b => + { + b.HasOne("FIORest.Database.Models.CXPCData", "CXPCData") + .WithMany("Entries") + .HasForeignKey("CXPCDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CXPCData"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXSellOrder", b => + { + b.HasOne("FIORest.Database.Models.CXDataModel", "CXDataModel") + .WithMany("SellingOrders") + .HasForeignKey("CXDataModelId"); + + b.Navigation("CXDataModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ChatMessage", b => + { + b.HasOne("FIORest.Database.Models.ChatModel", "ChatModel") + .WithMany("Messages") + .HasForeignKey("ChatModelId"); + + b.Navigation("ChatModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CompanyDataCurrencyBalance", b => + { + b.HasOne("FIORest.Database.Models.CompanyDataModel", "CompanyDataModel") + .WithMany("Balances") + .HasForeignKey("CompanyDataModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CompanyDataModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ContractCondition", b => + { + b.HasOne("FIORest.Database.Models.ContractModel", "ContractModel") + .WithMany("Conditions") + .HasForeignKey("ContractModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ContractModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ContractDependency", b => + { + b.HasOne("FIORest.Database.Models.ContractCondition", "ContractCondition") + .WithMany("Dependencies") + .HasForeignKey("ContractConditionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ContractCondition"); + }); + + modelBuilder.Entity("FIORest.Database.Models.DestinationLine", b => + { + b.HasOne("FIORest.Database.Models.FLIGHTSFlightSegment", "FLIGHTSFlightSegment") + .WithMany("DestinationLines") + .HasForeignKey("FLIGHTSFlightSegmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("FLIGHTSFlightSegment"); + }); + + modelBuilder.Entity("FIORest.Database.Models.FLIGHTSFlight", b => + { + b.HasOne("FIORest.Database.Models.FLIGHTSModel", "FLIGHTSModel") + .WithMany("Flights") + .HasForeignKey("FLIGHTSModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("FLIGHTSModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.FLIGHTSFlightSegment", b => + { + b.HasOne("FIORest.Database.Models.FLIGHTSFlight", "FLIGHTSFlight") + .WithMany("Segments") + .HasForeignKey("FLIGHTSFlightId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("FLIGHTSFlight"); + }); + + modelBuilder.Entity("FIORest.Database.Models.FailedLoginAttempt", b => + { + b.HasOne("FIORest.Database.Models.AuthenticationModel", "AuthenticationModel") + .WithMany("FailedAttempts") + .HasForeignKey("AuthenticationModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AuthenticationModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.GroupUserEntryModel", b => + { + b.HasOne("FIORest.Database.Models.GroupModel", "GroupModel") + .WithMany("GroupUsers") + .HasForeignKey("GroupModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("GroupModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureInfo", b => + { + b.HasOne("FIORest.Database.Models.InfrastructureModel", "InfrastructureModel") + .WithMany("InfrastructureInfos") + .HasForeignKey("InfrastructureModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("InfrastructureModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureProjectContributions", b => + { + b.HasOne("FIORest.Database.Models.InfrastructureInfo", "InfrastructureInfo") + .WithMany("Contributions") + .HasForeignKey("InfrastructureInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("InfrastructureInfo"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureProjectUpgradeCosts", b => + { + b.HasOne("FIORest.Database.Models.InfrastructureInfo", "InfrastructureInfo") + .WithMany("UpgradeCosts") + .HasForeignKey("InfrastructureInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("InfrastructureInfo"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureProjectUpkeeps", b => + { + b.HasOne("FIORest.Database.Models.InfrastructureInfo", "InfrastructureInfo") + .WithMany("Upkeeps") + .HasForeignKey("InfrastructureInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("InfrastructureInfo"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureReport", b => + { + b.HasOne("FIORest.Database.Models.InfrastructureModel", "InfrastructureModel") + .WithMany("InfrastructureReports") + .HasForeignKey("InfrastructureModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("InfrastructureModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.JumpCacheRouteJump", b => + { + b.HasOne("FIORest.Database.Models.JumpCacheModel", "JumpCache") + .WithMany("Jumps") + .HasForeignKey("JumpCacheModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("JumpCache"); + }); + + modelBuilder.Entity("FIORest.Database.Models.OriginLine", b => + { + b.HasOne("FIORest.Database.Models.FLIGHTSFlightSegment", "FLIGHTSFlightSegment") + .WithMany("OriginLines") + .HasForeignKey("FLIGHTSFlightSegmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("FLIGHTSFlightSegment"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PermissionAllowance", b => + { + b.HasOne("FIORest.Database.Models.AuthenticationModel", "AuthenticationModel") + .WithMany("Allowances") + .HasForeignKey("AuthenticationModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AuthenticationModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetBuildRequirement", b => + { + b.HasOne("FIORest.Database.Models.PlanetDataModel", "PlanetDataModel") + .WithMany("BuildRequirements") + .HasForeignKey("PlanetDataModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlanetDataModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetCOGCProgram", b => + { + b.HasOne("FIORest.Database.Models.PlanetDataModel", "PlanetDataModel") + .WithMany("COGCPrograms") + .HasForeignKey("PlanetDataModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlanetDataModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetCOGCUpkeep", b => + { + b.HasOne("FIORest.Database.Models.PlanetDataModel", "PlanetDataModel") + .WithMany("COGCUpkeep") + .HasForeignKey("PlanetDataModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlanetDataModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetCOGCVote", b => + { + b.HasOne("FIORest.Database.Models.PlanetDataModel", "PlanetDataModel") + .WithMany("COGCVotes") + .HasForeignKey("PlanetDataModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlanetDataModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetDataResource", b => + { + b.HasOne("FIORest.Database.Models.PlanetDataModel", "PlanetDataModel") + .WithMany("Resources") + .HasForeignKey("PlanetDataModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlanetDataModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetProductionFee", b => + { + b.HasOne("FIORest.Database.Models.PlanetDataModel", "PlanetDataModel") + .WithMany("ProductionFees") + .HasForeignKey("PlanetDataModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlanetDataModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ProductionLine", b => + { + b.HasOne("FIORest.Database.Models.PRODLinesModel", "PRODLinesModelModel") + .WithMany("ProductionLines") + .HasForeignKey("PRODLinesModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PRODLinesModelModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ProductionLineInput", b => + { + b.HasOne("FIORest.Database.Models.ProductionLineOrder", "ProductionLineOrder") + .WithMany("Inputs") + .HasForeignKey("ProductionLineOrderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ProductionLineOrder"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ProductionLineOrder", b => + { + b.HasOne("FIORest.Database.Models.ProductionLine", "ProductionLine") + .WithMany("Orders") + .HasForeignKey("ProductionLineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ProductionLine"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ProductionLineOutput", b => + { + b.HasOne("FIORest.Database.Models.ProductionLineOrder", "ProductionLineOrder") + .WithMany("Outputs") + .HasForeignKey("ProductionLineOrderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ProductionLineOrder"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SHIPSRepairMaterial", b => + { + b.HasOne("FIORest.Database.Models.SHIPSShip", "SHIPSShip") + .WithMany("RepairMaterials") + .HasForeignKey("SHIPSShipId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SHIPSShip"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SHIPSShip", b => + { + b.HasOne("FIORest.Database.Models.SHIPSModel", "SHIPSModel") + .WithMany("Ships") + .HasForeignKey("SHIPSModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SHIPSModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESBuilding", b => + { + b.HasOne("FIORest.Database.Models.SITESSite", "SITESSite") + .WithMany("Buildings") + .HasForeignKey("SITESSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SITESSite"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESReclaimableMaterial", b => + { + b.HasOne("FIORest.Database.Models.SITESBuilding", "SITESBuilding") + .WithMany("ReclaimableMaterials") + .HasForeignKey("SITESBuildingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SITESBuilding"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESRepairMaterial", b => + { + b.HasOne("FIORest.Database.Models.SITESBuilding", "SITESBuilding") + .WithMany("RepairMaterials") + .HasForeignKey("SITESBuildingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SITESBuilding"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESSite", b => + { + b.HasOne("FIORest.Database.Models.SITESModel", "SITESModel") + .WithMany("Sites") + .HasForeignKey("SITESModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SITESModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SellingAd", b => + { + b.HasOne("FIORest.Database.Models.LocalMarketModel", "LocalMarketModel") + .WithMany("SellingAds") + .HasForeignKey("LocalMarketModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("LocalMarketModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ShippingAd", b => + { + b.HasOne("FIORest.Database.Models.LocalMarketModel", "LocalMarketModel") + .WithMany("ShippingAds") + .HasForeignKey("LocalMarketModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("LocalMarketModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.StorageItem", b => + { + b.HasOne("FIORest.Database.Models.StorageModel", "StorageModel") + .WithMany("StorageItems") + .HasForeignKey("StorageModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("StorageModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SubSector", b => + { + b.HasOne("FIORest.Database.Models.WorldSectorsModel", "WorldSectorsModel") + .WithMany("SubSectors") + .HasForeignKey("WorldSectorsModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("WorldSectorsModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SubSectorVertex", b => + { + b.HasOne("FIORest.Database.Models.SubSector", "SubSector") + .WithMany("Vertices") + .HasForeignKey("SubSectorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SubSector"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SystemConnection", b => + { + b.HasOne("FIORest.Database.Models.SystemStarsModel", "SystemStarsModel") + .WithMany("Connections") + .HasForeignKey("SystemStarsModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SystemStarsModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.UserSettingsBurnRate", b => + { + b.HasOne("FIORest.Database.Models.UserSettingsModel", "UserSettingsModel") + .WithMany("BurnRateSettings") + .HasForeignKey("UserSettingsModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("UserSettingsModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.UserSettingsBurnRateExclusion", b => + { + b.HasOne("FIORest.Database.Models.UserSettingsBurnRate", "UserSettingsBurnRate") + .WithMany("MaterialExclusions") + .HasForeignKey("UserSettingsBurnRateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("UserSettingsBurnRate"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorkforceDescription", b => + { + b.HasOne("FIORest.Database.Models.WorkforceModel", "WorkforceModel") + .WithMany("Workforces") + .HasForeignKey("WorkforceModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("WorkforceModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorkforceNeed", b => + { + b.HasOne("FIORest.Database.Models.WorkforceDescription", "WorkforceDescription") + .WithMany("WorkforceNeeds") + .HasForeignKey("WorkforceDescriptionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("WorkforceDescription"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorkforcePerOneHundreedNeed", b => + { + b.HasOne("FIORest.Database.Models.WorkforcePerOneHundred", "WorkforcePerOneHundred") + .WithMany("Needs") + .HasForeignKey("WorkforcePerOneHundredId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("WorkforcePerOneHundred"); + }); + + modelBuilder.Entity("FIORest.Database.Models.AuthenticationModel", b => + { + b.Navigation("Allowances"); + + b.Navigation("APIKeys"); + + b.Navigation("FailedAttempts"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BUIModel", b => + { + b.Navigation("BuildingCosts"); + + b.Navigation("Recipes"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BUIRecipe", b => + { + b.Navigation("Inputs"); + + b.Navigation("Outputs"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BuildingDegradationModel", b => + { + b.Navigation("ReclaimableMaterials"); + + b.Navigation("RepairMaterials"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXDataModel", b => + { + b.Navigation("BuyingOrders"); + + b.Navigation("SellingOrders"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXOSTradeOrder", b => + { + b.Navigation("Trades"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXOSTradeOrdersModel", b => + { + b.Navigation("TradeOrders"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXPCData", b => + { + b.Navigation("Entries"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ChatModel", b => + { + b.Navigation("Messages"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CompanyDataModel", b => + { + b.Navigation("Balances"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ContractCondition", b => + { + b.Navigation("Dependencies"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ContractModel", b => + { + b.Navigation("Conditions"); + }); + + modelBuilder.Entity("FIORest.Database.Models.FLIGHTSFlight", b => + { + b.Navigation("Segments"); + }); + + modelBuilder.Entity("FIORest.Database.Models.FLIGHTSFlightSegment", b => + { + b.Navigation("DestinationLines"); + + b.Navigation("OriginLines"); + }); + + modelBuilder.Entity("FIORest.Database.Models.FLIGHTSModel", b => + { + b.Navigation("Flights"); + }); + + modelBuilder.Entity("FIORest.Database.Models.GroupModel", b => + { + b.Navigation("GroupUsers"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureInfo", b => + { + b.Navigation("Contributions"); + + b.Navigation("UpgradeCosts"); + + b.Navigation("Upkeeps"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureModel", b => + { + b.Navigation("InfrastructureInfos"); + + b.Navigation("InfrastructureReports"); + }); + + modelBuilder.Entity("FIORest.Database.Models.JumpCacheModel", b => + { + b.Navigation("Jumps"); + }); + + modelBuilder.Entity("FIORest.Database.Models.LocalMarketModel", b => + { + b.Navigation("BuyingAds"); + + b.Navigation("SellingAds"); + + b.Navigation("ShippingAds"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PRODLinesModel", b => + { + b.Navigation("ProductionLines"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetDataModel", b => + { + b.Navigation("BuildRequirements"); + + b.Navigation("COGCPrograms"); + + b.Navigation("COGCUpkeep"); + + b.Navigation("COGCVotes"); + + b.Navigation("ProductionFees"); + + b.Navigation("Resources"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ProductionLine", b => + { + b.Navigation("Orders"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ProductionLineOrder", b => + { + b.Navigation("Inputs"); + + b.Navigation("Outputs"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SHIPSModel", b => + { + b.Navigation("Ships"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SHIPSShip", b => + { + b.Navigation("RepairMaterials"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESBuilding", b => + { + b.Navigation("ReclaimableMaterials"); + + b.Navigation("RepairMaterials"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESModel", b => + { + b.Navigation("Sites"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESSite", b => + { + b.Navigation("Buildings"); + }); + + modelBuilder.Entity("FIORest.Database.Models.StorageModel", b => + { + b.Navigation("StorageItems"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SubSector", b => + { + b.Navigation("Vertices"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SystemStarsModel", b => + { + b.Navigation("Connections"); + }); + + modelBuilder.Entity("FIORest.Database.Models.UserSettingsBurnRate", b => + { + b.Navigation("MaterialExclusions"); + }); + + modelBuilder.Entity("FIORest.Database.Models.UserSettingsModel", b => + { + b.Navigation("BurnRateSettings"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorkforceDescription", b => + { + b.Navigation("WorkforceNeeds"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorkforceModel", b => + { + b.Navigation("Workforces"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorkforcePerOneHundred", b => + { + b.Navigation("Needs"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorldSectorsModel", b => + { + b.Navigation("SubSectors"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Migrations/PostgresMigrations/20211025200131_ChatMessageIndexes.cs b/Migrations/PostgresMigrations/20211025200131_ChatMessageIndexes.cs new file mode 100644 index 0000000..1945fac --- /dev/null +++ b/Migrations/PostgresMigrations/20211025200131_ChatMessageIndexes.cs @@ -0,0 +1,31 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace FIORest.Migrations.PostgresMigrations +{ + public partial class ChatMessageIndexes : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateIndex( + name: "IX_ChatMessages_MessageTimestamp", + table: "ChatMessages", + column: "MessageTimestamp"); + + migrationBuilder.CreateIndex( + name: "IX_ChatMessages_Timestamp", + table: "ChatMessages", + column: "Timestamp"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_ChatMessages_MessageTimestamp", + table: "ChatMessages"); + + migrationBuilder.DropIndex( + name: "IX_ChatMessages_Timestamp", + table: "ChatMessages"); + } + } +} diff --git a/Migrations/PostgresMigrations/PostgresDataContextModelSnapshot.cs b/Migrations/PostgresMigrations/PostgresDataContextModelSnapshot.cs index 2f0faa7..d9cede3 100644 --- a/Migrations/PostgresMigrations/PostgresDataContextModelSnapshot.cs +++ b/Migrations/PostgresMigrations/PostgresDataContextModelSnapshot.cs @@ -863,6 +863,10 @@ namespace FIORest.Migrations.PostgresMigrations b.HasIndex("ChatModelId"); + b.HasIndex("MessageTimestamp"); + + b.HasIndex("Timestamp"); + b.ToTable("ChatMessages"); }); diff --git a/Migrations/SqliteMigrations/20211025200122_ChatMessageIndexes.Designer.cs b/Migrations/SqliteMigrations/20211025200122_ChatMessageIndexes.Designer.cs new file mode 100644 index 0000000..2e42453 --- /dev/null +++ b/Migrations/SqliteMigrations/20211025200122_ChatMessageIndexes.Designer.cs @@ -0,0 +1,4931 @@ +// +using System; +using FIORest.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +namespace FIORest.Migrations.SqliteMigrations +{ + [DbContext(typeof(SqliteDataContext))] + [Migration("20211025200122_ChatMessageIndexes")] + partial class ChatMessageIndexes + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "5.0.7"); + + modelBuilder.Entity("FIORest.Database.Models.APIKey", b => + { + b.Property("APIKeyId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AllowWrites") + .HasColumnType("INTEGER"); + + b.Property("Application") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("AuthAPIKey") + .HasColumnType("TEXT"); + + b.Property("AuthenticationModelId") + .HasColumnType("INTEGER"); + + b.Property("LastAccessTime") + .HasColumnType("TEXT"); + + b.HasKey("APIKeyId"); + + b.HasIndex("AuthenticationModelId"); + + b.ToTable("APIKeys"); + }); + + modelBuilder.Entity("FIORest.Database.Models.AuthenticationModel", b => + { + b.Property("AuthenticationModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AccountEnabled") + .HasColumnType("INTEGER"); + + b.Property("AuthorizationExpiry") + .HasColumnType("TEXT"); + + b.Property("AuthorizationKey") + .HasColumnType("TEXT"); + + b.Property("DisabledReason") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("IsAdministrator") + .HasColumnType("INTEGER"); + + b.Property("PasswordHash") + .HasMaxLength(128) + .HasColumnType("TEXT"); + + b.Property("UserName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("AuthenticationModelId"); + + b.ToTable("AuthenticationModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BUIBuildingCost", b => + { + b.Property("BUIBuildingCostId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Amount") + .HasColumnType("INTEGER"); + + b.Property("BUIModelId") + .HasColumnType("INTEGER"); + + b.Property("CommodityName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("CommodityTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("Volume") + .HasColumnType("REAL"); + + b.Property("Weight") + .HasColumnType("REAL"); + + b.HasKey("BUIBuildingCostId"); + + b.HasIndex("BUIModelId"); + + b.ToTable("BUIBuildingCosts"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BUIModel", b => + { + b.Property("BUIModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AreaCost") + .HasColumnType("INTEGER"); + + b.Property("Engineers") + .HasColumnType("INTEGER"); + + b.Property("Expertise") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("Pioneers") + .HasColumnType("INTEGER"); + + b.Property("Scientists") + .HasColumnType("INTEGER"); + + b.Property("Settlers") + .HasColumnType("INTEGER"); + + b.Property("Technicians") + .HasColumnType("INTEGER"); + + b.Property("Ticker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("BUIModelId"); + + b.ToTable("BUIModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BUIRecipe", b => + { + b.Property("BUIRecipeId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("BUIModelId") + .HasColumnType("INTEGER"); + + b.Property("DurationMs") + .HasColumnType("INTEGER"); + + b.Property("RecipeName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.HasKey("BUIRecipeId"); + + b.HasIndex("BUIModelId"); + + b.ToTable("BUIRecipes"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BUIRecipeInput", b => + { + b.Property("BUIRecipeInputId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Amount") + .HasColumnType("INTEGER"); + + b.Property("BUIRecipeId") + .HasColumnType("INTEGER"); + + b.Property("CommodityName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("CommodityTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("Volume") + .HasColumnType("REAL"); + + b.Property("Weight") + .HasColumnType("REAL"); + + b.HasKey("BUIRecipeInputId"); + + b.HasIndex("BUIRecipeId"); + + b.ToTable("BUIRecipeInputs"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BUIRecipeOutput", b => + { + b.Property("BUIRecipeOutputId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Amount") + .HasColumnType("INTEGER"); + + b.Property("BUIRecipeId") + .HasColumnType("INTEGER"); + + b.Property("CommodityName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("CommodityTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("Volume") + .HasColumnType("REAL"); + + b.Property("Weight") + .HasColumnType("REAL"); + + b.HasKey("BUIRecipeOutputId"); + + b.HasIndex("BUIRecipeId"); + + b.ToTable("BUIRecipeOutputs"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BuildingDegradationModel", b => + { + b.Property("BuildingDegradationModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("BuildingCreated") + .HasColumnType("INTEGER"); + + b.Property("BuildingTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("Condition") + .HasColumnType("REAL"); + + b.Property("DaysSinceLastRepair") + .HasColumnType("REAL"); + + b.Property("HasBeenRepaired") + .HasColumnType("INTEGER"); + + b.HasKey("BuildingDegradationModelId"); + + b.HasIndex("BuildingTicker", "DaysSinceLastRepair", "HasBeenRepaired") + .IsUnique(); + + b.ToTable("BuildingDegradationModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BuildingDegradationReclaimableMaterialModel", b => + { + b.Property("BuildingDegradationReclaimableMaterialModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("BuildingDegradationModelId") + .HasColumnType("INTEGER"); + + b.Property("MaterialCount") + .HasColumnType("INTEGER"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.HasKey("BuildingDegradationReclaimableMaterialModelId"); + + b.HasIndex("BuildingDegradationModelId", "MaterialTicker") + .IsUnique(); + + b.ToTable("BuildingDegradationReclaimableMaterialModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BuildingDegradationRepairMaterialModel", b => + { + b.Property("BuildingDegradationRepairMaterialModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("BuildingDegradationModelId") + .HasColumnType("INTEGER"); + + b.Property("MaterialCount") + .HasColumnType("INTEGER"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.HasKey("BuildingDegradationRepairMaterialModelId"); + + b.HasIndex("BuildingDegradationModelId", "MaterialTicker") + .IsUnique(); + + b.ToTable("BuildingDegradationRepairMaterialModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BuyingAd", b => + { + b.Property("BuyingAdId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ContractNaturalId") + .HasColumnType("INTEGER"); + + b.Property("CreationTimeEpochMs") + .HasColumnType("INTEGER"); + + b.Property("CreatorCompanyCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("CreatorCompanyId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CreatorCompanyName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("DeliveryTime") + .HasColumnType("INTEGER"); + + b.Property("ExpiryTimeEpochMs") + .HasColumnType("INTEGER"); + + b.Property("LocalMarketModelId") + .HasColumnType("INTEGER"); + + b.Property("MaterialAmount") + .HasColumnType("INTEGER"); + + b.Property("MaterialCategory") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("MaterialVolume") + .HasColumnType("REAL"); + + b.Property("MaterialWeight") + .HasColumnType("REAL"); + + b.Property("MinimumRating") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("PlanetId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PlanetName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PlanetNaturalId") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("Price") + .HasColumnType("REAL"); + + b.Property("PriceCurrency") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.HasKey("BuyingAdId"); + + b.HasIndex("LocalMarketModelId"); + + b.ToTable("BuyingAds"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXBuyOrder", b => + { + b.Property("OrderId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CXDataModelId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CompanyCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("CompanyId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CompanyName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("ItemCost") + .HasColumnType("REAL"); + + b.Property("ItemCount") + .HasColumnType("INTEGER"); + + b.HasKey("OrderId"); + + b.HasIndex("CXDataModelId"); + + b.HasIndex("OrderId"); + + b.HasIndex("OrderId", "CXDataModelId") + .IsUnique(); + + b.ToTable("CXBuyOrders"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXDataModel", b => + { + b.Property("CXDataModelId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("AllTimeHigh") + .HasColumnType("REAL"); + + b.Property("AllTimeLow") + .HasColumnType("REAL"); + + b.Property("Ask") + .HasColumnType("REAL"); + + b.Property("AskCount") + .HasColumnType("INTEGER"); + + b.Property("Bid") + .HasColumnType("REAL"); + + b.Property("BidCount") + .HasColumnType("INTEGER"); + + b.Property("Currency") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("Demand") + .HasColumnType("INTEGER"); + + b.Property("ExchangeCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("ExchangeName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("High") + .HasColumnType("REAL"); + + b.Property("Low") + .HasColumnType("REAL"); + + b.Property("MMBuy") + .HasColumnType("REAL"); + + b.Property("MMSell") + .HasColumnType("REAL"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("NarrowPriceBandHigh") + .HasColumnType("REAL"); + + b.Property("NarrowPriceBandLow") + .HasColumnType("REAL"); + + b.Property("Previous") + .HasColumnType("REAL"); + + b.Property("Price") + .HasColumnType("REAL"); + + b.Property("PriceAverage") + .HasColumnType("REAL"); + + b.Property("PriceTimeEpochMs") + .HasColumnType("INTEGER"); + + b.Property("Supply") + .HasColumnType("INTEGER"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("Traded") + .HasColumnType("INTEGER"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("VolumeAmount") + .HasColumnType("REAL"); + + b.Property("WidePriceBandHigh") + .HasColumnType("REAL"); + + b.Property("WidePriceBandLow") + .HasColumnType("REAL"); + + b.HasKey("CXDataModelId"); + + b.HasIndex("ExchangeCode"); + + b.HasIndex("MaterialId"); + + b.HasIndex("MaterialName"); + + b.HasIndex("MaterialTicker"); + + b.HasIndex("ExchangeCode", "MaterialId") + .IsUnique(); + + b.ToTable("CXDataModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXOSTrade", b => + { + b.Property("CXOSTradeId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Amount") + .HasColumnType("INTEGER"); + + b.Property("CXOSTradeOrderId") + .HasColumnType("INTEGER"); + + b.Property("PartnerCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("PartnerId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PartnerName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("Price") + .HasColumnType("REAL"); + + b.Property("PriceCurrency") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("TradeId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("TradeTimeEpochMs") + .HasColumnType("INTEGER"); + + b.HasKey("CXOSTradeId"); + + b.HasIndex("CXOSTradeOrderId"); + + b.ToTable("CXOSTrades"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXOSTradeOrder", b => + { + b.Property("CXOSTradeOrderId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Amount") + .HasColumnType("INTEGER"); + + b.Property("BrokerId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CXOSTradeOrdersModelId") + .HasColumnType("INTEGER"); + + b.Property("CreatedEpochMs") + .HasColumnType("INTEGER"); + + b.Property("ExchangeCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("ExchangeName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("InitialAmount") + .HasColumnType("INTEGER"); + + b.Property("Limit") + .HasColumnType("REAL"); + + b.Property("LimitCurrency") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("OrderType") + .HasMaxLength(16) + .HasColumnType("TEXT"); + + b.Property("Status") + .HasMaxLength(16) + .HasColumnType("TEXT"); + + b.Property("TradeOrderId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("CXOSTradeOrderId"); + + b.HasIndex("CXOSTradeOrdersModelId"); + + b.ToTable("CXOSTradeOrders"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXOSTradeOrdersModel", b => + { + b.Property("CXOSTradeOrdersModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("CXOSTradeOrdersModelId"); + + b.ToTable("CXOSTradeOrderModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXPCData", b => + { + b.Property("CXPCDataId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("EndDataEpochMs") + .HasColumnType("INTEGER"); + + b.Property("ExchangeCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("StartDataEpochMs") + .HasColumnType("INTEGER"); + + b.HasKey("CXPCDataId"); + + b.ToTable("CXPCData"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXPCDataEntry", b => + { + b.Property("CXPCDataEntryId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("CXPCDataId") + .HasColumnType("INTEGER"); + + b.Property("Close") + .HasColumnType("REAL"); + + b.Property("Open") + .HasColumnType("REAL"); + + b.Property("TimeEpochMs") + .HasColumnType("INTEGER"); + + b.Property("Traded") + .HasColumnType("INTEGER"); + + b.Property("Volume") + .HasColumnType("REAL"); + + b.HasKey("CXPCDataEntryId"); + + b.HasIndex("CXPCDataId"); + + b.ToTable("CXPCDataEntries"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXSellOrder", b => + { + b.Property("OrderId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CXDataModelId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CompanyCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("CompanyId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CompanyName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("ItemCost") + .HasColumnType("REAL"); + + b.Property("ItemCount") + .HasColumnType("INTEGER"); + + b.HasKey("OrderId"); + + b.HasIndex("CXDataModelId"); + + b.HasIndex("OrderId"); + + b.HasIndex("OrderId", "CXDataModelId") + .IsUnique(); + + b.ToTable("CXSellOrders"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ChatMessage", b => + { + b.Property("MessageId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("ChatModelId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MessageDeleted") + .HasColumnType("INTEGER"); + + b.Property("MessageText") + .HasColumnType("TEXT"); + + b.Property("MessageTimestamp") + .HasColumnType("INTEGER"); + + b.Property("MessageType") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("SenderId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("UserName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("MessageId"); + + b.HasIndex("ChatModelId"); + + b.HasIndex("MessageTimestamp"); + + b.HasIndex("Timestamp"); + + b.ToTable("ChatMessages"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ChatModel", b => + { + b.Property("ChannelId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CreationTime") + .HasColumnType("INTEGER"); + + b.Property("DisplayName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("LastActivity") + .HasColumnType("INTEGER"); + + b.Property("NaturalId") + .HasMaxLength(16) + .HasColumnType("TEXT"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("Type") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("UserCount") + .HasColumnType("INTEGER"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("ChannelId"); + + b.ToTable("ChatModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ComexExchange", b => + { + b.Property("ComexExchangeId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("CurrencyCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("CurrencyDecimals") + .HasColumnType("INTEGER"); + + b.Property("CurrencyName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CurrencyNumericCode") + .HasColumnType("INTEGER"); + + b.Property("ExchangeCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("ExchangeId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("ExchangeName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("ExchangeOperatorCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("ExchangeOperatorId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("ExchangeOperatorName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("LocationId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("LocationName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("LocationNaturalId") + .HasMaxLength(16) + .HasColumnType("TEXT"); + + b.HasKey("ComexExchangeId"); + + b.ToTable("ComexExchanges"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CompanyDataCurrencyBalance", b => + { + b.Property("CompanyDataCurrencyBalanceId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Balance") + .HasColumnType("REAL"); + + b.Property("CompanyDataModelId") + .HasColumnType("INTEGER"); + + b.Property("Currency") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.HasKey("CompanyDataCurrencyBalanceId"); + + b.HasIndex("CompanyDataModelId"); + + b.ToTable("CompanyDataCurrencyBalances"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CompanyDataModel", b => + { + b.Property("CompanyDataModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ActivityRating") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("CompanyCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("CompanyId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CompanyName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("CountryId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CreatedEpochMs") + .HasColumnType("INTEGER"); + + b.Property("CurrencyCode") + .HasMaxLength(4) + .HasColumnType("TEXT"); + + b.Property("HighestTier") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("OverallRating") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("Pioneer") + .HasColumnType("INTEGER"); + + b.Property("ReliabilityRating") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("StabilityRating") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("StartingLocation") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("StartingProfile") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Team") + .HasColumnType("INTEGER"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("UserName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("CompanyDataModelId"); + + b.HasIndex("CompanyId") + .IsUnique(); + + b.HasIndex("UserName"); + + b.ToTable("CompanyDataModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ContractCondition", b => + { + b.Property("ContractConditionId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Address") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Amount") + .HasColumnType("REAL"); + + b.Property("BlockId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("ConditionId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("ConditionIndex") + .HasColumnType("INTEGER"); + + b.Property("ContractModelId") + .HasColumnType("INTEGER"); + + b.Property("Currency") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("DeadlineEpochMs") + .HasColumnType("INTEGER"); + + b.Property("Destination") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MaterialAmount") + .HasColumnType("INTEGER"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("Party") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PickedUpAmount") + .HasColumnType("INTEGER"); + + b.Property("PickedUpMaterialId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PickedUpMaterialTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("ShipmentItemId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Status") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("Type") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Volume") + .HasColumnType("REAL"); + + b.Property("Weight") + .HasColumnType("REAL"); + + b.HasKey("ContractConditionId"); + + b.HasIndex("ContractModelId"); + + b.ToTable("ContractConditions"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ContractDependency", b => + { + b.Property("ContractDependencyId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ContractConditionId") + .HasColumnType("INTEGER"); + + b.Property("Dependency") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("ContractDependencyId"); + + b.HasIndex("ContractConditionId"); + + b.ToTable("ContractDependencies"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ContractModel", b => + { + b.Property("ContractModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("CanExtend") + .HasColumnType("INTEGER"); + + b.Property("ContractId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("ContractLocalId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("DateEpochMs") + .HasColumnType("INTEGER"); + + b.Property("DueDateEpochMs") + .HasColumnType("INTEGER"); + + b.Property("ExtensionDeadlineEpochMs") + .HasColumnType("INTEGER"); + + b.Property("PartnerCompanyCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("PartnerId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PartnerName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("Party") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Status") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("ContractModelId"); + + b.ToTable("ContractModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CountryRegistryCountry", b => + { + b.Property("CountryRegistryCountryId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("CountryCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("CountryId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CountryName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("CurrencyCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("CurrencyDecimals") + .HasColumnType("INTEGER"); + + b.Property("CurrencyName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CurrencyNumericCode") + .HasColumnType("INTEGER"); + + b.HasKey("CountryRegistryCountryId"); + + b.ToTable("CountryRegistryCountries"); + }); + + modelBuilder.Entity("FIORest.Database.Models.DestinationLine", b => + { + b.Property("DestinationLineId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("FLIGHTSFlightSegmentId") + .HasColumnType("INTEGER"); + + b.Property("LineId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("LineName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("LineNaturalId") + .HasMaxLength(16) + .HasColumnType("TEXT"); + + b.Property("Type") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("DestinationLineId"); + + b.HasIndex("FLIGHTSFlightSegmentId"); + + b.ToTable("FLIGHTSDestinationLines"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ExpertsModel", b => + { + b.Property("ExpertsModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AgricultureActive") + .HasColumnType("INTEGER"); + + b.Property("AgricultureAvailable") + .HasColumnType("INTEGER"); + + b.Property("AgricultureEfficiencyGain") + .HasColumnType("REAL"); + + b.Property("ChemistryActive") + .HasColumnType("INTEGER"); + + b.Property("ChemistryAvailable") + .HasColumnType("INTEGER"); + + b.Property("ChemistryEfficiencyGain") + .HasColumnType("REAL"); + + b.Property("ConstructionActive") + .HasColumnType("INTEGER"); + + b.Property("ConstructionAvailable") + .HasColumnType("INTEGER"); + + b.Property("ConstructionEfficiencyGain") + .HasColumnType("REAL"); + + b.Property("ElectronicsActive") + .HasColumnType("INTEGER"); + + b.Property("ElectronicsAvailable") + .HasColumnType("INTEGER"); + + b.Property("ElectronicsEfficiencyGain") + .HasColumnType("REAL"); + + b.Property("FoodIndustriesActive") + .HasColumnType("INTEGER"); + + b.Property("FoodIndustriesAvailable") + .HasColumnType("INTEGER"); + + b.Property("FoodIndustriesEfficiencyGain") + .HasColumnType("REAL"); + + b.Property("FuelRefiningActive") + .HasColumnType("INTEGER"); + + b.Property("FuelRefiningAvailable") + .HasColumnType("INTEGER"); + + b.Property("FuelRefiningEfficiencyGain") + .HasColumnType("REAL"); + + b.Property("ManufacturingActive") + .HasColumnType("INTEGER"); + + b.Property("ManufacturingAvailable") + .HasColumnType("INTEGER"); + + b.Property("ManufacturingEfficiencyGain") + .HasColumnType("REAL"); + + b.Property("MetallurgyActive") + .HasColumnType("INTEGER"); + + b.Property("MetallurgyAvailable") + .HasColumnType("INTEGER"); + + b.Property("MetallurgyEfficiencyGain") + .HasColumnType("REAL"); + + b.Property("PlanetId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("ResourceExtractionAvailable") + .HasColumnType("INTEGER"); + + b.Property("ResourceExtractionEfficiencyGain") + .HasColumnType("REAL"); + + b.Property("ResourceExtractioneActive") + .HasColumnType("INTEGER"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("ExpertsModelId"); + + b.ToTable("ExpertModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.FLIGHTSFlight", b => + { + b.Property("FLIGHTSFlightId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ArrivalTimeEpochMs") + .HasColumnType("INTEGER"); + + b.Property("CurrentSegmentIndex") + .HasColumnType("INTEGER"); + + b.Property("DepartureTimeEpochMs") + .HasColumnType("INTEGER"); + + b.Property("Destination") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("FLIGHTSModelId") + .HasColumnType("INTEGER"); + + b.Property("FlightId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("FtlDistance") + .HasColumnType("REAL"); + + b.Property("IsAborted") + .HasColumnType("INTEGER"); + + b.Property("Origin") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("ShipId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("StlDistance") + .HasColumnType("REAL"); + + b.HasKey("FLIGHTSFlightId"); + + b.HasIndex("FLIGHTSModelId"); + + b.ToTable("FLIGHTSFlights"); + }); + + modelBuilder.Entity("FIORest.Database.Models.FLIGHTSFlightSegment", b => + { + b.Property("FLIGHTSFlightSegmentId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ArrivalTimeEpochMs") + .HasColumnType("INTEGER"); + + b.Property("DepartureTimeEpochMs") + .HasColumnType("INTEGER"); + + b.Property("Destination") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("FLIGHTSFlightId") + .HasColumnType("INTEGER"); + + b.Property("FtlDistance") + .HasColumnType("REAL"); + + b.Property("FtlFuelConsumption") + .HasColumnType("REAL"); + + b.Property("Origin") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("StlDistance") + .HasColumnType("REAL"); + + b.Property("StlFuelConsumption") + .HasColumnType("REAL"); + + b.Property("Type") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("FLIGHTSFlightSegmentId"); + + b.HasIndex("FLIGHTSFlightId"); + + b.ToTable("FLIGHTSFlightSegments"); + }); + + modelBuilder.Entity("FIORest.Database.Models.FLIGHTSModel", b => + { + b.Property("FLIGHTSModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("FLIGHTSModelId"); + + b.ToTable("FLIGHTSModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.FXDataModel", b => + { + b.Property("FXDataModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("BaseCurrencyCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("BaseCurrencyName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("BaseCurrencyNumericCode") + .HasColumnType("INTEGER"); + + b.Property("BrokerId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("High") + .HasColumnType("TEXT"); + + b.Property("Low") + .HasColumnType("TEXT"); + + b.Property("Open") + .HasColumnType("TEXT"); + + b.Property("Previous") + .HasColumnType("TEXT"); + + b.Property("PriceUpdateEpochMs") + .HasColumnType("INTEGER"); + + b.Property("QuoteCurrencyCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("QuoteCurrencyName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("QuoteCurrencyNumericCode") + .HasColumnType("INTEGER"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("Traded") + .HasColumnType("TEXT"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Volume") + .HasColumnType("TEXT"); + + b.HasKey("FXDataModelId"); + + b.ToTable("FXDataModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.FailedLoginAttempt", b => + { + b.Property("FailedLoginAttemptId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Address") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("AuthenticationModelId") + .HasColumnType("INTEGER"); + + b.Property("FailedAttemptDateTime") + .HasColumnType("TEXT"); + + b.HasKey("FailedLoginAttemptId"); + + b.HasIndex("AuthenticationModelId"); + + b.ToTable("FailedLoginAttempts"); + }); + + modelBuilder.Entity("FIORest.Database.Models.GroupModel", b => + { + b.Property("GroupModelId") + .HasColumnType("INTEGER"); + + b.Property("GroupName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("GroupOwner") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("GroupModelId"); + + b.ToTable("GroupModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.GroupUserEntryModel", b => + { + b.Property("GroupUserEntryModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("GroupModelId") + .HasColumnType("INTEGER"); + + b.Property("GroupUserName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("GroupUserEntryModelId"); + + b.HasIndex("GroupModelId"); + + b.ToTable("GroupUserEntryModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureInfo", b => + { + b.Property("InfrastructureInfoId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ActiveLevel") + .HasColumnType("INTEGER"); + + b.Property("CurrentLevel") + .HasColumnType("INTEGER"); + + b.Property("InfrastructureModelId") + .HasColumnType("INTEGER"); + + b.Property("Level") + .HasColumnType("INTEGER"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("ProjectId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Ticker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("Type") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("UpgradeStatus") + .HasColumnType("REAL"); + + b.Property("UpkeepStatus") + .HasColumnType("REAL"); + + b.HasKey("InfrastructureInfoId"); + + b.HasIndex("InfrastructureModelId"); + + b.ToTable("InfrastructureInfos"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureModel", b => + { + b.Property("InfrastructureModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("PopulationId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("InfrastructureModelId"); + + b.ToTable("InfrastructureModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureProjectContributions", b => + { + b.Property("InfrastructureProjectContributionsId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Amount") + .HasColumnType("INTEGER"); + + b.Property("CompanyCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("CompanyId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CompanyName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("InfrastructureInfoId") + .HasColumnType("INTEGER"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("TimestampEpochMs") + .HasColumnType("INTEGER"); + + b.HasKey("InfrastructureProjectContributionsId"); + + b.HasIndex("InfrastructureInfoId"); + + b.ToTable("InfrastructureProjectContributions"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureProjectUpgradeCosts", b => + { + b.Property("InfrastructureProjectUpgradeCostsId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Amount") + .HasColumnType("INTEGER"); + + b.Property("CurrentAmount") + .HasColumnType("INTEGER"); + + b.Property("InfrastructureInfoId") + .HasColumnType("INTEGER"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.HasKey("InfrastructureProjectUpgradeCostsId"); + + b.HasIndex("InfrastructureInfoId"); + + b.ToTable("InfrastructureProjectUpgradeCosts"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureProjectUpkeeps", b => + { + b.Property("InfrastructureProjectUpkeepsId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Amount") + .HasColumnType("INTEGER"); + + b.Property("CurrentAmount") + .HasColumnType("INTEGER"); + + b.Property("Duration") + .HasColumnType("INTEGER"); + + b.Property("InfrastructureInfoId") + .HasColumnType("INTEGER"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("NextTickTimestampEpochMs") + .HasColumnType("INTEGER"); + + b.Property("StoreCapacity") + .HasColumnType("INTEGER"); + + b.Property("Stored") + .HasColumnType("INTEGER"); + + b.HasKey("InfrastructureProjectUpkeepsId"); + + b.HasIndex("InfrastructureInfoId"); + + b.ToTable("InfrastructureProjectUpkeeps"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureReport", b => + { + b.Property("InfrastructureReportId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AverageHappinessEngineer") + .HasColumnType("REAL"); + + b.Property("AverageHappinessPioneer") + .HasColumnType("REAL"); + + b.Property("AverageHappinessScientist") + .HasColumnType("REAL"); + + b.Property("AverageHappinessSettler") + .HasColumnType("REAL"); + + b.Property("AverageHappinessTechnician") + .HasColumnType("REAL"); + + b.Property("ExplorersGraceEnabled") + .HasColumnType("INTEGER"); + + b.Property("InfrastructureModelId") + .HasColumnType("INTEGER"); + + b.Property("NeedFulfillmentComfort") + .HasColumnType("REAL"); + + b.Property("NeedFulfillmentCulture") + .HasColumnType("REAL"); + + b.Property("NeedFulfillmentEducation") + .HasColumnType("REAL"); + + b.Property("NeedFulfillmentHealth") + .HasColumnType("REAL"); + + b.Property("NeedFulfillmentLifeSupport") + .HasColumnType("REAL"); + + b.Property("NeedFulfillmentSafety") + .HasColumnType("REAL"); + + b.Property("NextPopulationEngineer") + .HasColumnType("INTEGER"); + + b.Property("NextPopulationPioneer") + .HasColumnType("INTEGER"); + + b.Property("NextPopulationScientist") + .HasColumnType("INTEGER"); + + b.Property("NextPopulationSettler") + .HasColumnType("INTEGER"); + + b.Property("NextPopulationTechnician") + .HasColumnType("INTEGER"); + + b.Property("OpenJobsEngineer") + .HasColumnType("REAL"); + + b.Property("OpenJobsPioneer") + .HasColumnType("REAL"); + + b.Property("OpenJobsScientist") + .HasColumnType("REAL"); + + b.Property("OpenJobsSettler") + .HasColumnType("REAL"); + + b.Property("OpenJobsTechnician") + .HasColumnType("REAL"); + + b.Property("PopulationDifferenceEngineer") + .HasColumnType("INTEGER"); + + b.Property("PopulationDifferencePioneer") + .HasColumnType("INTEGER"); + + b.Property("PopulationDifferenceScientist") + .HasColumnType("INTEGER"); + + b.Property("PopulationDifferenceSettler") + .HasColumnType("INTEGER"); + + b.Property("PopulationDifferenceTechnician") + .HasColumnType("INTEGER"); + + b.Property("SimulationPeriod") + .HasColumnType("INTEGER"); + + b.Property("TimestampMs") + .HasColumnType("INTEGER"); + + b.Property("UnemploymentRateEngineer") + .HasColumnType("REAL"); + + b.Property("UnemploymentRatePioneer") + .HasColumnType("REAL"); + + b.Property("UnemploymentRateScientist") + .HasColumnType("REAL"); + + b.Property("UnemploymentRateSettler") + .HasColumnType("REAL"); + + b.Property("UnemploymentRateTechnician") + .HasColumnType("REAL"); + + b.HasKey("InfrastructureReportId"); + + b.HasIndex("InfrastructureModelId"); + + b.ToTable("InfrastructureModelReports"); + }); + + modelBuilder.Entity("FIORest.Database.Models.JumpCacheModel", b => + { + b.Property("JumpCacheModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DestinationNaturalId") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("DestinationSystemId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("DestinationSystemName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("JumpCount") + .HasColumnType("INTEGER"); + + b.Property("OverallDistance") + .HasColumnType("REAL"); + + b.Property("SourceSystemId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("SourceSystemName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("SourceSystemNaturalId") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.HasKey("JumpCacheModelId"); + + b.ToTable("JumpCacheModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.JumpCacheRouteJump", b => + { + b.Property("JumpCacheRouteJumpId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DestinationNaturalId") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("DestinationSystemId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("DestinationSystemName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Distance") + .HasColumnType("REAL"); + + b.Property("JumpCacheModelId") + .HasColumnType("INTEGER"); + + b.Property("SourceSystemId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("SourceSystemName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("SourceSystemNaturalId") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.HasKey("JumpCacheRouteJumpId"); + + b.HasIndex("JumpCacheModelId"); + + b.ToTable("JumpCacheRoutes"); + }); + + modelBuilder.Entity("FIORest.Database.Models.LocalMarketModel", b => + { + b.Property("LocalMarketModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("MarketId") + .HasColumnType("TEXT"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("LocalMarketModelId"); + + b.ToTable("LocalMarketModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.MATModel", b => + { + b.Property("MATModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("CategoryId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CategoryName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MatId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("Ticker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Volume") + .HasColumnType("REAL"); + + b.Property("Weight") + .HasColumnType("REAL"); + + b.HasKey("MATModelId"); + + b.ToTable("MATModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.OriginLine", b => + { + b.Property("OriginLineId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("FLIGHTSFlightSegmentId") + .HasColumnType("INTEGER"); + + b.Property("LineId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("LineName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("LineNaturalId") + .HasMaxLength(16) + .HasColumnType("TEXT"); + + b.Property("Type") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("OriginLineId"); + + b.HasIndex("FLIGHTSFlightSegmentId"); + + b.ToTable("FLIGHTSOriginLines"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PRODLinesModel", b => + { + b.Property("PRODLinesModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("SiteId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("PRODLinesModelId"); + + b.ToTable("PRODLinesModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PermissionAllowance", b => + { + b.Property("PermissionAllowanceId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AuthenticationModelId") + .HasColumnType("INTEGER"); + + b.Property("BuildingData") + .HasColumnType("INTEGER"); + + b.Property("ContractData") + .HasColumnType("INTEGER"); + + b.Property("ExpertsData") + .HasColumnType("INTEGER"); + + b.Property("FlightData") + .HasColumnType("INTEGER"); + + b.Property("ProductionData") + .HasColumnType("INTEGER"); + + b.Property("ShipmentTrackingData") + .HasColumnType("INTEGER"); + + b.Property("StorageData") + .HasColumnType("INTEGER"); + + b.Property("UserName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("WorkforceData") + .HasColumnType("INTEGER"); + + b.HasKey("PermissionAllowanceId"); + + b.HasIndex("AuthenticationModelId"); + + b.ToTable("PermissionAllowances"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetBuildRequirement", b => + { + b.Property("PlanetBuildRequirementId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("MaterialAmount") + .HasColumnType("INTEGER"); + + b.Property("MaterialCategory") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("MaterialVolume") + .HasColumnType("REAL"); + + b.Property("MaterialWeight") + .HasColumnType("REAL"); + + b.Property("PlanetDataModelId") + .HasColumnType("INTEGER"); + + b.HasKey("PlanetBuildRequirementId"); + + b.HasIndex("PlanetDataModelId"); + + b.ToTable("PlanetBuildRequirements"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetCOGCProgram", b => + { + b.Property("PlanetCOGCProgramId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("EndEpochMs") + .HasColumnType("INTEGER"); + + b.Property("PlanetDataModelId") + .HasColumnType("INTEGER"); + + b.Property("ProgramType") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("StartEpochMs") + .HasColumnType("INTEGER"); + + b.HasKey("PlanetCOGCProgramId"); + + b.HasIndex("PlanetDataModelId"); + + b.ToTable("PlanetCOGCPrograms"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetCOGCUpkeep", b => + { + b.Property("PlanetCOGCUpkeepId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("CurrentAmount") + .HasColumnType("INTEGER"); + + b.Property("DueDateEpochMs") + .HasColumnType("INTEGER"); + + b.Property("MaterialAmount") + .HasColumnType("INTEGER"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("MaterialVolume") + .HasColumnType("REAL"); + + b.Property("MaterialWeight") + .HasColumnType("REAL"); + + b.Property("PlanetDataModelId") + .HasColumnType("INTEGER"); + + b.HasKey("PlanetCOGCUpkeepId"); + + b.HasIndex("PlanetDataModelId"); + + b.ToTable("PlanetCOGCUpkeep"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetCOGCVote", b => + { + b.Property("PlanetCOGCVoteId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("CompanyCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("CompanyName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("Influence") + .HasColumnType("REAL"); + + b.Property("PlanetDataModelId") + .HasColumnType("INTEGER"); + + b.Property("VoteTimeEpochMs") + .HasColumnType("INTEGER"); + + b.Property("VoteType") + .HasColumnType("TEXT"); + + b.HasKey("PlanetCOGCVoteId"); + + b.HasIndex("PlanetDataModelId"); + + b.ToTable("PlanetCOGCVotes"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetDataModel", b => + { + b.Property("PlanetDataModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("BaseLocalMarketFee") + .HasColumnType("REAL"); + + b.Property("COGCProgramStatus") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CollectorCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("CollectorId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CollectorName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("CurrencyCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("CurrencyName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("FactionCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("FactionName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Fertility") + .HasColumnType("REAL"); + + b.Property("GovernorCorporationCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("GovernorCorporationId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("GovernorCorporationName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("GovernorId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("GovernorUserName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Gravity") + .HasColumnType("REAL"); + + b.Property("HasAdministrationCenter") + .HasColumnType("INTEGER"); + + b.Property("HasChamberOfCommerce") + .HasColumnType("INTEGER"); + + b.Property("HasLocalMarket") + .HasColumnType("INTEGER"); + + b.Property("HasShipyard") + .HasColumnType("INTEGER"); + + b.Property("HasWarehouse") + .HasColumnType("INTEGER"); + + b.Property("LocalMarketFeeFactor") + .HasColumnType("REAL"); + + b.Property("MagneticField") + .HasColumnType("REAL"); + + b.Property("Mass") + .HasColumnType("REAL"); + + b.Property("MassEarth") + .HasColumnType("REAL"); + + b.Property("Nameable") + .HasColumnType("INTEGER"); + + b.Property("Namer") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("NamingDataEpochMs") + .HasColumnType("INTEGER"); + + b.Property("OrbitEccentricity") + .HasColumnType("REAL"); + + b.Property("OrbitInclination") + .HasColumnType("REAL"); + + b.Property("OrbitIndex") + .HasColumnType("INTEGER"); + + b.Property("OrbitPeriapsis") + .HasColumnType("REAL"); + + b.Property("OrbitRightAscension") + .HasColumnType("REAL"); + + b.Property("OrbitSemiMajorAxis") + .HasColumnType("REAL"); + + b.Property("PlanetId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PlanetName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PlanetNaturalId") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("PlanetTier") + .HasColumnType("INTEGER"); + + b.Property("PopulationId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Pressure") + .HasColumnType("REAL"); + + b.Property("Radiation") + .HasColumnType("REAL"); + + b.Property("Radius") + .HasColumnType("REAL"); + + b.Property("Sunlight") + .HasColumnType("REAL"); + + b.Property("Surface") + .HasColumnType("INTEGER"); + + b.Property("SystemId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Temperature") + .HasColumnType("REAL"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("WarehouseFee") + .HasColumnType("REAL"); + + b.HasKey("PlanetDataModelId"); + + b.ToTable("PlanetDataModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetDataResource", b => + { + b.Property("PlanetDataResourceId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Factor") + .HasColumnType("REAL"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PlanetDataModelId") + .HasColumnType("INTEGER"); + + b.Property("ResourceType") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("PlanetDataResourceId"); + + b.HasIndex("PlanetDataModelId"); + + b.ToTable("PlanetDataResources"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetProductionFee", b => + { + b.Property("PlanetProductionFeeId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Category") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("FeeAmount") + .HasColumnType("REAL"); + + b.Property("FeeCurrency") + .HasColumnType("TEXT"); + + b.Property("PlanetDataModelId") + .HasColumnType("INTEGER"); + + b.HasKey("PlanetProductionFeeId"); + + b.HasIndex("PlanetDataModelId"); + + b.ToTable("PlanetProductionFees"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetSite", b => + { + b.Property("PlanetSiteId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("OwnerCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("OwnerId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("OwnerName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PlanetId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PlotId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PlotNumber") + .HasColumnType("INTEGER"); + + b.Property("SiteId") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.HasKey("PlanetSiteId"); + + b.ToTable("PlanetSites"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PriceIndexModel", b => + { + b.Property("PriceIndexModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("PriceIndexLabel") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PriceIndexValue") + .HasColumnType("REAL"); + + b.Property("TimeStamp") + .HasColumnType("TEXT"); + + b.HasKey("PriceIndexModelId"); + + b.ToTable("PriceIndexModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ProductionLine", b => + { + b.Property("ProductionLineId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Capacity") + .HasColumnType("INTEGER"); + + b.Property("Condition") + .HasColumnType("REAL"); + + b.Property("Efficiency") + .HasColumnType("REAL"); + + b.Property("LineId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PRODLinesModelId") + .HasColumnType("INTEGER"); + + b.Property("PlanetId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PlanetName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PlanetNaturalId") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("SiteId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Type") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("ProductionLineId"); + + b.HasIndex("PRODLinesModelId"); + + b.ToTable("ProductionLines"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ProductionLineInput", b => + { + b.Property("ProductionLineInputId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("MaterialAmount") + .HasColumnType("INTEGER"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("ProductionLineOrderId") + .HasColumnType("INTEGER"); + + b.HasKey("ProductionLineInputId"); + + b.HasIndex("ProductionLineOrderId"); + + b.ToTable("ProductionLineInputs"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ProductionLineOrder", b => + { + b.Property("ProductionLineOrderId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("CompletedPercentage") + .HasColumnType("REAL"); + + b.Property("CompletionEpochMs") + .HasColumnType("INTEGER"); + + b.Property("CreatedEpochMs") + .HasColumnType("INTEGER"); + + b.Property("DurationMs") + .HasColumnType("INTEGER"); + + b.Property("IsHalted") + .HasColumnType("INTEGER"); + + b.Property("LastUpdatedEpochMs") + .HasColumnType("INTEGER"); + + b.Property("ProductionFee") + .HasColumnType("REAL"); + + b.Property("ProductionFeeCollectorCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("ProductionFeeCollectorId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("ProductionFeeCollectorName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("ProductionFeeCurrency") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("ProductionId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("ProductionLineId") + .HasColumnType("INTEGER"); + + b.Property("Recurring") + .HasColumnType("INTEGER"); + + b.Property("StartedEpochMs") + .HasColumnType("INTEGER"); + + b.HasKey("ProductionLineOrderId"); + + b.HasIndex("ProductionLineId"); + + b.ToTable("ProductionLineOrders"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ProductionLineOutput", b => + { + b.Property("ProductionLineOutputId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("MaterialAmount") + .HasColumnType("INTEGER"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("ProductionLineOrderId") + .HasColumnType("INTEGER"); + + b.HasKey("ProductionLineOutputId"); + + b.HasIndex("ProductionLineOrderId"); + + b.ToTable("ProductionLineOutputs"); + }); + + modelBuilder.Entity("FIORest.Database.Models.Registration", b => + { + b.Property("RegistrationId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("RegistrationGuid") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("RegistrationTime") + .HasColumnType("TEXT"); + + b.Property("UserName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("RegistrationId"); + + b.ToTable("Registrations"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SHIPSModel", b => + { + b.Property("SHIPSModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("SHIPSModelId"); + + b.ToTable("SHIPSModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SHIPSRepairMaterial", b => + { + b.Property("SHIPSRepairMaterialId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Amount") + .HasColumnType("INTEGER"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("SHIPSShipId") + .HasColumnType("INTEGER"); + + b.HasKey("SHIPSRepairMaterialId"); + + b.HasIndex("SHIPSShipId"); + + b.ToTable("SHIPSRepairMaterial"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SHIPSShip", b => + { + b.Property("SHIPSShipId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Acceleration") + .HasColumnType("REAL"); + + b.Property("BlueprintNaturalId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CommissioningTimeEpochMs") + .HasColumnType("INTEGER"); + + b.Property("Condition") + .HasColumnType("REAL"); + + b.Property("EmitterPower") + .HasColumnType("REAL"); + + b.Property("FlightId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("FtlFuelStoreId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("LastRepairEpochMs") + .HasColumnType("INTEGER"); + + b.Property("Location") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("Mass") + .HasColumnType("REAL"); + + b.Property("Name") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("OperatingEmptyMass") + .HasColumnType("REAL"); + + b.Property("ReactorPower") + .HasColumnType("REAL"); + + b.Property("Registration") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("SHIPSModelId") + .HasColumnType("INTEGER"); + + b.Property("ShipId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("StlFuelFlowRate") + .HasColumnType("REAL"); + + b.Property("StlFuelStoreId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("StoreId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Thrust") + .HasColumnType("REAL"); + + b.Property("Volume") + .HasColumnType("REAL"); + + b.HasKey("SHIPSShipId"); + + b.HasIndex("SHIPSModelId"); + + b.ToTable("SHIPSShips"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESBuilding", b => + { + b.Property("SITESBuildingId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("BuildingCreated") + .HasColumnType("INTEGER"); + + b.Property("BuildingId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("BuildingLastRepair") + .HasColumnType("INTEGER"); + + b.Property("BuildingName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("BuildingTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("Condition") + .HasColumnType("REAL"); + + b.Property("SITESSiteId") + .HasColumnType("INTEGER"); + + b.HasKey("SITESBuildingId"); + + b.HasIndex("SITESSiteId"); + + b.ToTable("SITESBuildings"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESModel", b => + { + b.Property("SITESModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("SITESModelId"); + + b.ToTable("SITESModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESReclaimableMaterial", b => + { + b.Property("SITESReclaimableMaterialId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("MaterialAmount") + .HasColumnType("INTEGER"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("SITESBuildingId") + .HasColumnType("INTEGER"); + + b.HasKey("SITESReclaimableMaterialId"); + + b.HasIndex("SITESBuildingId"); + + b.ToTable("SITESReclaimableMaterials"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESRepairMaterial", b => + { + b.Property("SITESRepairMaterialId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("MaterialAmount") + .HasColumnType("INTEGER"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("SITESBuildingId") + .HasColumnType("INTEGER"); + + b.HasKey("SITESRepairMaterialId"); + + b.HasIndex("SITESBuildingId"); + + b.ToTable("SITESRepairMaterials"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESSite", b => + { + b.Property("SITESSiteId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("InvestedPermits") + .HasColumnType("INTEGER"); + + b.Property("MaximumPermits") + .HasColumnType("INTEGER"); + + b.Property("PlanetFoundedEpochMs") + .HasColumnType("INTEGER"); + + b.Property("PlanetId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PlanetIdentifier") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("PlanetName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("SITESModelId") + .HasColumnType("INTEGER"); + + b.Property("SiteId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("SITESSiteId"); + + b.HasIndex("SITESModelId"); + + b.ToTable("SITESSites"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SellingAd", b => + { + b.Property("SellingAdId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ContractNaturalId") + .HasColumnType("INTEGER"); + + b.Property("CreationTimeEpochMs") + .HasColumnType("INTEGER"); + + b.Property("CreatorCompanyCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("CreatorCompanyId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CreatorCompanyName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("DeliveryTime") + .HasColumnType("INTEGER"); + + b.Property("ExpiryTimeEpochMs") + .HasColumnType("INTEGER"); + + b.Property("LocalMarketModelId") + .HasColumnType("INTEGER"); + + b.Property("MaterialAmount") + .HasColumnType("INTEGER"); + + b.Property("MaterialCategory") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("MaterialVolume") + .HasColumnType("REAL"); + + b.Property("MaterialWeight") + .HasColumnType("REAL"); + + b.Property("MinimumRating") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("PlanetId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PlanetName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PlanetNaturalId") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("Price") + .HasColumnType("REAL"); + + b.Property("PriceCurrency") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.HasKey("SellingAdId"); + + b.HasIndex("LocalMarketModelId"); + + b.ToTable("SellingAds"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ShippingAd", b => + { + b.Property("ShippingAdId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("CargoVolume") + .HasColumnType("REAL"); + + b.Property("CargoWeight") + .HasColumnType("REAL"); + + b.Property("ContractNaturalId") + .HasColumnType("INTEGER"); + + b.Property("CreationTimeEpochMs") + .HasColumnType("INTEGER"); + + b.Property("CreatorCompanyCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("CreatorCompanyId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CreatorCompanyName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("DeliveryTime") + .HasColumnType("INTEGER"); + + b.Property("DestinationPlanetId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("DestinationPlanetName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("DestinationPlanetNaturalId") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("ExpiryTimeEpochMs") + .HasColumnType("INTEGER"); + + b.Property("LocalMarketModelId") + .HasColumnType("INTEGER"); + + b.Property("MinimumRating") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("OriginPlanetId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("OriginPlanetName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("OriginPlanetNaturalId") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("PayoutCurrency") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("PayoutPrice") + .HasColumnType("REAL"); + + b.Property("PlanetId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PlanetName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PlanetNaturalId") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.HasKey("ShippingAdId"); + + b.HasIndex("LocalMarketModelId"); + + b.ToTable("ShippingAds"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SimulationData", b => + { + b.Property("SimulationDataId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("FlightFTLFactor") + .HasColumnType("INTEGER"); + + b.Property("FlightSTLFactor") + .HasColumnType("INTEGER"); + + b.Property("ParsecLength") + .HasColumnType("INTEGER"); + + b.Property("PlanetaryMotionFactor") + .HasColumnType("INTEGER"); + + b.Property("SimulationInterval") + .HasColumnType("INTEGER"); + + b.HasKey("SimulationDataId"); + + b.ToTable("SimulationData"); + }); + + modelBuilder.Entity("FIORest.Database.Models.Station", b => + { + b.Property("StationId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ComexCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("ComexId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("ComexName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("CommisionTimeEpochMs") + .HasColumnType("INTEGER"); + + b.Property("CountryCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("CountryId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CountryName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("CurrencyCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("CurrencyDecimals") + .HasColumnType("INTEGER"); + + b.Property("CurrencyName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CurrencyNumericCode") + .HasColumnType("INTEGER"); + + b.Property("GovernorCorporationCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("GovernorCorporationId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("GovernorCorporationName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("GovernorId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("GovernorUserName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("NaturalId") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("SystemId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("SystemName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("SystemNaturalId") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("WarehouseId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("StationId"); + + b.ToTable("Stations"); + }); + + modelBuilder.Entity("FIORest.Database.Models.StorageItem", b => + { + b.Property("StorageItemId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("MaterialAmount") + .HasColumnType("INTEGER"); + + b.Property("MaterialCategory") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("MaterialValue") + .HasColumnType("REAL"); + + b.Property("MaterialValueCurrency") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("MaterialVolume") + .HasColumnType("REAL"); + + b.Property("MaterialWeight") + .HasColumnType("REAL"); + + b.Property("StorageModelId") + .HasColumnType("INTEGER"); + + b.Property("TotalVolume") + .HasColumnType("REAL"); + + b.Property("TotalWeight") + .HasColumnType("REAL"); + + b.Property("Type") + .HasMaxLength(16) + .HasColumnType("TEXT"); + + b.HasKey("StorageItemId"); + + b.HasIndex("StorageModelId"); + + b.ToTable("StorageItems"); + }); + + modelBuilder.Entity("FIORest.Database.Models.StorageModel", b => + { + b.Property("StorageModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AddressableId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("FixedStore") + .HasColumnType("INTEGER"); + + b.Property("Name") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("StorageId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("Type") + .HasMaxLength(16) + .HasColumnType("TEXT"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("VolumeCapacity") + .HasColumnType("REAL"); + + b.Property("VolumeLoad") + .HasColumnType("REAL"); + + b.Property("WeightCapacity") + .HasColumnType("REAL"); + + b.Property("WeightLoad") + .HasColumnType("REAL"); + + b.HasKey("StorageModelId"); + + b.ToTable("StorageModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SubSector", b => + { + b.Property("SubSectorId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("SSId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("WorldSectorsModelId") + .HasColumnType("INTEGER"); + + b.HasKey("SubSectorId"); + + b.HasIndex("WorldSectorsModelId"); + + b.ToTable("SubSectors"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SubSectorVertex", b => + { + b.Property("SubSectorVertexId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("SubSectorId") + .HasColumnType("INTEGER"); + + b.Property("X") + .HasColumnType("REAL"); + + b.Property("Y") + .HasColumnType("REAL"); + + b.Property("Z") + .HasColumnType("REAL"); + + b.HasKey("SubSectorVertexId"); + + b.HasIndex("SubSectorId"); + + b.ToTable("SubSectorVertices"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SystemConnection", b => + { + b.Property("SystemConnectionId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Connection") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("SystemStarsModelId") + .HasColumnType("INTEGER"); + + b.HasKey("SystemConnectionId"); + + b.HasIndex("SystemStarsModelId"); + + b.ToTable("SystemConnections"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SystemStar", b => + { + b.Property("SystemStarId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Luminosity") + .HasColumnType("REAL"); + + b.Property("Mass") + .HasColumnType("REAL"); + + b.Property("MassSol") + .HasColumnType("REAL"); + + b.Property("PositionX") + .HasColumnType("REAL"); + + b.Property("PositionY") + .HasColumnType("REAL"); + + b.Property("PositionZ") + .HasColumnType("REAL"); + + b.Property("SectorId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("SubSectorId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("SystemId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("SystemName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("SystemNaturalId") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("Type") + .HasMaxLength(16) + .HasColumnType("TEXT"); + + b.HasKey("SystemStarId"); + + b.ToTable("SystemStars"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SystemStarsModel", b => + { + b.Property("SystemStarsModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Name") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("NaturalId") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("PositionX") + .HasColumnType("REAL"); + + b.Property("PositionY") + .HasColumnType("REAL"); + + b.Property("PositionZ") + .HasColumnType("REAL"); + + b.Property("SectorId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("SubSectorId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("SystemId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("Type") + .HasMaxLength(16) + .HasColumnType("TEXT"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("SystemStarsModelId"); + + b.ToTable("SystemStarsModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.UserDataModel", b => + { + b.Property("UserDataModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("CompanyId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("CreatedEpochMs") + .HasColumnType("INTEGER"); + + b.Property("IsModeratorChat") + .HasColumnType("INTEGER"); + + b.Property("IsPayingUser") + .HasColumnType("INTEGER"); + + b.Property("Pioneer") + .HasColumnType("INTEGER"); + + b.Property("PlanetNamingRights") + .HasColumnType("INTEGER"); + + b.Property("SystemNamingRights") + .HasColumnType("INTEGER"); + + b.Property("Team") + .HasColumnType("INTEGER"); + + b.Property("Tier") + .HasMaxLength(16) + .HasColumnType("TEXT"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("UserName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("UserDataModelId"); + + b.ToTable("UserDataModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.UserSettingsBurnRate", b => + { + b.Property("UserSettingsBurnRateId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("PlanetNaturalId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("UserSettingsModelId") + .HasColumnType("INTEGER"); + + b.HasKey("UserSettingsBurnRateId"); + + b.HasIndex("UserSettingsModelId"); + + b.ToTable("UserSettingsBurnRates"); + }); + + modelBuilder.Entity("FIORest.Database.Models.UserSettingsBurnRateExclusion", b => + { + b.Property("UserSettingsBurnRateExclusionId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("UserSettingsBurnRateId") + .HasColumnType("INTEGER"); + + b.HasKey("UserSettingsBurnRateExclusionId"); + + b.HasIndex("UserSettingsBurnRateId"); + + b.ToTable("UserSettingsBurnRateExclusions"); + }); + + modelBuilder.Entity("FIORest.Database.Models.UserSettingsModel", b => + { + b.Property("UserSettingsModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("UserName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("UserSettingsModelId"); + + b.ToTable("UserSettingsModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WarehouseModel", b => + { + b.Property("WarehouseModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("FeeAmount") + .HasColumnType("REAL"); + + b.Property("FeeCollectorCode") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("FeeCollectorId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("FeeCollectorName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("FeeCurrency") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("LocationName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("LocationNaturalId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("NextPaymentTimestampEpochMs") + .HasColumnType("INTEGER"); + + b.Property("StoreId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("Units") + .HasColumnType("INTEGER"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("VolumeCapacity") + .HasColumnType("REAL"); + + b.Property("WarehouseId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("WeightCapacity") + .HasColumnType("REAL"); + + b.HasKey("WarehouseModelId"); + + b.ToTable("WarehouseModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorkforceDescription", b => + { + b.Property("WorkforceDescriptionId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Capacity") + .HasColumnType("INTEGER"); + + b.Property("Population") + .HasColumnType("INTEGER"); + + b.Property("Required") + .HasColumnType("INTEGER"); + + b.Property("Reserve") + .HasColumnType("INTEGER"); + + b.Property("Satisfaction") + .HasColumnType("REAL"); + + b.Property("WorkforceModelId") + .HasColumnType("INTEGER"); + + b.Property("WorkforceTypeName") + .HasMaxLength(16) + .HasColumnType("TEXT"); + + b.HasKey("WorkforceDescriptionId"); + + b.HasIndex("WorkforceModelId"); + + b.ToTable("WorkforceDescriptions"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorkforceModel", b => + { + b.Property("WorkforceModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("LastWorkforceUpdateTime") + .HasColumnType("TEXT"); + + b.Property("PlanetId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PlanetName") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PlanetNaturalId") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("SiteId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("WorkforceModelId"); + + b.ToTable("WorkforceModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorkforceNeed", b => + { + b.Property("WorkforceNeedId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Category") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Essential") + .HasColumnType("INTEGER"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("Satisfaction") + .HasColumnType("REAL"); + + b.Property("UnitsPerInterval") + .HasColumnType("REAL"); + + b.Property("UnitsPerOneHundred") + .HasColumnType("REAL"); + + b.Property("WorkforceDescriptionId") + .HasColumnType("INTEGER"); + + b.HasKey("WorkforceNeedId"); + + b.HasIndex("WorkforceDescriptionId"); + + b.ToTable("WorkforceNeeds"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorkforcePerOneHundred", b => + { + b.Property("WorkforcePerOneHundredId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("WorkforceType") + .HasMaxLength(16) + .HasColumnType("TEXT"); + + b.HasKey("WorkforcePerOneHundredId"); + + b.ToTable("WorkforcePerOneHundreds"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorkforcePerOneHundreedNeed", b => + { + b.Property("WorkforcePerOneHundreedNeedId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Amount") + .HasColumnType("REAL"); + + b.Property("MaterialCategory") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MaterialId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("MaterialName") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("MaterialTicker") + .HasMaxLength(8) + .HasColumnType("TEXT"); + + b.Property("WorkforcePerOneHundredId") + .HasColumnType("INTEGER"); + + b.HasKey("WorkforcePerOneHundreedNeedId"); + + b.HasIndex("WorkforcePerOneHundredId"); + + b.ToTable("WorkforcePerOneHundredNeeds"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorldSectorsModel", b => + { + b.Property("WorldSectorsModelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("HexQ") + .HasColumnType("INTEGER"); + + b.Property("HexR") + .HasColumnType("INTEGER"); + + b.Property("HexS") + .HasColumnType("INTEGER"); + + b.Property("Name") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("SectorId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("Size") + .HasColumnType("INTEGER"); + + b.Property("Timestamp") + .HasColumnType("TEXT"); + + b.Property("UserNameSubmitted") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.HasKey("WorldSectorsModelId"); + + b.ToTable("WorldSectorsModels"); + }); + + modelBuilder.Entity("FIORest.Database.Models.APIKey", b => + { + b.HasOne("FIORest.Database.Models.AuthenticationModel", "AuthenticationModel") + .WithMany("APIKeys") + .HasForeignKey("AuthenticationModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AuthenticationModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BUIBuildingCost", b => + { + b.HasOne("FIORest.Database.Models.BUIModel", "BuidModel") + .WithMany("BuildingCosts") + .HasForeignKey("BUIModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BuidModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BUIRecipe", b => + { + b.HasOne("FIORest.Database.Models.BUIModel", "BUIModel") + .WithMany("Recipes") + .HasForeignKey("BUIModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BUIModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BUIRecipeInput", b => + { + b.HasOne("FIORest.Database.Models.BUIRecipe", "BUIRecipe") + .WithMany("Inputs") + .HasForeignKey("BUIRecipeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BUIRecipe"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BUIRecipeOutput", b => + { + b.HasOne("FIORest.Database.Models.BUIRecipe", "BUIRecipe") + .WithMany("Outputs") + .HasForeignKey("BUIRecipeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BUIRecipe"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BuildingDegradationReclaimableMaterialModel", b => + { + b.HasOne("FIORest.Database.Models.BuildingDegradationModel", "BuildingDegradationModel") + .WithMany("ReclaimableMaterials") + .HasForeignKey("BuildingDegradationModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BuildingDegradationModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BuildingDegradationRepairMaterialModel", b => + { + b.HasOne("FIORest.Database.Models.BuildingDegradationModel", "BuildingDegradationModel") + .WithMany("RepairMaterials") + .HasForeignKey("BuildingDegradationModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BuildingDegradationModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BuyingAd", b => + { + b.HasOne("FIORest.Database.Models.LocalMarketModel", "LocalMarketModel") + .WithMany("BuyingAds") + .HasForeignKey("LocalMarketModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("LocalMarketModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXBuyOrder", b => + { + b.HasOne("FIORest.Database.Models.CXDataModel", "CXDataModel") + .WithMany("BuyingOrders") + .HasForeignKey("CXDataModelId"); + + b.Navigation("CXDataModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXOSTrade", b => + { + b.HasOne("FIORest.Database.Models.CXOSTradeOrder", "CXOSTradeOrder") + .WithMany("Trades") + .HasForeignKey("CXOSTradeOrderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CXOSTradeOrder"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXOSTradeOrder", b => + { + b.HasOne("FIORest.Database.Models.CXOSTradeOrdersModel", "CXOSTradeOrdersModel") + .WithMany("TradeOrders") + .HasForeignKey("CXOSTradeOrdersModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CXOSTradeOrdersModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXPCDataEntry", b => + { + b.HasOne("FIORest.Database.Models.CXPCData", "CXPCData") + .WithMany("Entries") + .HasForeignKey("CXPCDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CXPCData"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXSellOrder", b => + { + b.HasOne("FIORest.Database.Models.CXDataModel", "CXDataModel") + .WithMany("SellingOrders") + .HasForeignKey("CXDataModelId"); + + b.Navigation("CXDataModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ChatMessage", b => + { + b.HasOne("FIORest.Database.Models.ChatModel", "ChatModel") + .WithMany("Messages") + .HasForeignKey("ChatModelId"); + + b.Navigation("ChatModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CompanyDataCurrencyBalance", b => + { + b.HasOne("FIORest.Database.Models.CompanyDataModel", "CompanyDataModel") + .WithMany("Balances") + .HasForeignKey("CompanyDataModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CompanyDataModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ContractCondition", b => + { + b.HasOne("FIORest.Database.Models.ContractModel", "ContractModel") + .WithMany("Conditions") + .HasForeignKey("ContractModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ContractModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ContractDependency", b => + { + b.HasOne("FIORest.Database.Models.ContractCondition", "ContractCondition") + .WithMany("Dependencies") + .HasForeignKey("ContractConditionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ContractCondition"); + }); + + modelBuilder.Entity("FIORest.Database.Models.DestinationLine", b => + { + b.HasOne("FIORest.Database.Models.FLIGHTSFlightSegment", "FLIGHTSFlightSegment") + .WithMany("DestinationLines") + .HasForeignKey("FLIGHTSFlightSegmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("FLIGHTSFlightSegment"); + }); + + modelBuilder.Entity("FIORest.Database.Models.FLIGHTSFlight", b => + { + b.HasOne("FIORest.Database.Models.FLIGHTSModel", "FLIGHTSModel") + .WithMany("Flights") + .HasForeignKey("FLIGHTSModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("FLIGHTSModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.FLIGHTSFlightSegment", b => + { + b.HasOne("FIORest.Database.Models.FLIGHTSFlight", "FLIGHTSFlight") + .WithMany("Segments") + .HasForeignKey("FLIGHTSFlightId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("FLIGHTSFlight"); + }); + + modelBuilder.Entity("FIORest.Database.Models.FailedLoginAttempt", b => + { + b.HasOne("FIORest.Database.Models.AuthenticationModel", "AuthenticationModel") + .WithMany("FailedAttempts") + .HasForeignKey("AuthenticationModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AuthenticationModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.GroupUserEntryModel", b => + { + b.HasOne("FIORest.Database.Models.GroupModel", "GroupModel") + .WithMany("GroupUsers") + .HasForeignKey("GroupModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("GroupModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureInfo", b => + { + b.HasOne("FIORest.Database.Models.InfrastructureModel", "InfrastructureModel") + .WithMany("InfrastructureInfos") + .HasForeignKey("InfrastructureModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("InfrastructureModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureProjectContributions", b => + { + b.HasOne("FIORest.Database.Models.InfrastructureInfo", "InfrastructureInfo") + .WithMany("Contributions") + .HasForeignKey("InfrastructureInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("InfrastructureInfo"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureProjectUpgradeCosts", b => + { + b.HasOne("FIORest.Database.Models.InfrastructureInfo", "InfrastructureInfo") + .WithMany("UpgradeCosts") + .HasForeignKey("InfrastructureInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("InfrastructureInfo"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureProjectUpkeeps", b => + { + b.HasOne("FIORest.Database.Models.InfrastructureInfo", "InfrastructureInfo") + .WithMany("Upkeeps") + .HasForeignKey("InfrastructureInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("InfrastructureInfo"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureReport", b => + { + b.HasOne("FIORest.Database.Models.InfrastructureModel", "InfrastructureModel") + .WithMany("InfrastructureReports") + .HasForeignKey("InfrastructureModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("InfrastructureModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.JumpCacheRouteJump", b => + { + b.HasOne("FIORest.Database.Models.JumpCacheModel", "JumpCache") + .WithMany("Jumps") + .HasForeignKey("JumpCacheModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("JumpCache"); + }); + + modelBuilder.Entity("FIORest.Database.Models.OriginLine", b => + { + b.HasOne("FIORest.Database.Models.FLIGHTSFlightSegment", "FLIGHTSFlightSegment") + .WithMany("OriginLines") + .HasForeignKey("FLIGHTSFlightSegmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("FLIGHTSFlightSegment"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PermissionAllowance", b => + { + b.HasOne("FIORest.Database.Models.AuthenticationModel", "AuthenticationModel") + .WithMany("Allowances") + .HasForeignKey("AuthenticationModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AuthenticationModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetBuildRequirement", b => + { + b.HasOne("FIORest.Database.Models.PlanetDataModel", "PlanetDataModel") + .WithMany("BuildRequirements") + .HasForeignKey("PlanetDataModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlanetDataModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetCOGCProgram", b => + { + b.HasOne("FIORest.Database.Models.PlanetDataModel", "PlanetDataModel") + .WithMany("COGCPrograms") + .HasForeignKey("PlanetDataModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlanetDataModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetCOGCUpkeep", b => + { + b.HasOne("FIORest.Database.Models.PlanetDataModel", "PlanetDataModel") + .WithMany("COGCUpkeep") + .HasForeignKey("PlanetDataModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlanetDataModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetCOGCVote", b => + { + b.HasOne("FIORest.Database.Models.PlanetDataModel", "PlanetDataModel") + .WithMany("COGCVotes") + .HasForeignKey("PlanetDataModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlanetDataModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetDataResource", b => + { + b.HasOne("FIORest.Database.Models.PlanetDataModel", "PlanetDataModel") + .WithMany("Resources") + .HasForeignKey("PlanetDataModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlanetDataModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetProductionFee", b => + { + b.HasOne("FIORest.Database.Models.PlanetDataModel", "PlanetDataModel") + .WithMany("ProductionFees") + .HasForeignKey("PlanetDataModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlanetDataModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ProductionLine", b => + { + b.HasOne("FIORest.Database.Models.PRODLinesModel", "PRODLinesModelModel") + .WithMany("ProductionLines") + .HasForeignKey("PRODLinesModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PRODLinesModelModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ProductionLineInput", b => + { + b.HasOne("FIORest.Database.Models.ProductionLineOrder", "ProductionLineOrder") + .WithMany("Inputs") + .HasForeignKey("ProductionLineOrderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ProductionLineOrder"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ProductionLineOrder", b => + { + b.HasOne("FIORest.Database.Models.ProductionLine", "ProductionLine") + .WithMany("Orders") + .HasForeignKey("ProductionLineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ProductionLine"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ProductionLineOutput", b => + { + b.HasOne("FIORest.Database.Models.ProductionLineOrder", "ProductionLineOrder") + .WithMany("Outputs") + .HasForeignKey("ProductionLineOrderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ProductionLineOrder"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SHIPSRepairMaterial", b => + { + b.HasOne("FIORest.Database.Models.SHIPSShip", "SHIPSShip") + .WithMany("RepairMaterials") + .HasForeignKey("SHIPSShipId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SHIPSShip"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SHIPSShip", b => + { + b.HasOne("FIORest.Database.Models.SHIPSModel", "SHIPSModel") + .WithMany("Ships") + .HasForeignKey("SHIPSModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SHIPSModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESBuilding", b => + { + b.HasOne("FIORest.Database.Models.SITESSite", "SITESSite") + .WithMany("Buildings") + .HasForeignKey("SITESSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SITESSite"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESReclaimableMaterial", b => + { + b.HasOne("FIORest.Database.Models.SITESBuilding", "SITESBuilding") + .WithMany("ReclaimableMaterials") + .HasForeignKey("SITESBuildingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SITESBuilding"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESRepairMaterial", b => + { + b.HasOne("FIORest.Database.Models.SITESBuilding", "SITESBuilding") + .WithMany("RepairMaterials") + .HasForeignKey("SITESBuildingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SITESBuilding"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESSite", b => + { + b.HasOne("FIORest.Database.Models.SITESModel", "SITESModel") + .WithMany("Sites") + .HasForeignKey("SITESModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SITESModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SellingAd", b => + { + b.HasOne("FIORest.Database.Models.LocalMarketModel", "LocalMarketModel") + .WithMany("SellingAds") + .HasForeignKey("LocalMarketModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("LocalMarketModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ShippingAd", b => + { + b.HasOne("FIORest.Database.Models.LocalMarketModel", "LocalMarketModel") + .WithMany("ShippingAds") + .HasForeignKey("LocalMarketModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("LocalMarketModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.StorageItem", b => + { + b.HasOne("FIORest.Database.Models.StorageModel", "StorageModel") + .WithMany("StorageItems") + .HasForeignKey("StorageModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("StorageModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SubSector", b => + { + b.HasOne("FIORest.Database.Models.WorldSectorsModel", "WorldSectorsModel") + .WithMany("SubSectors") + .HasForeignKey("WorldSectorsModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("WorldSectorsModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SubSectorVertex", b => + { + b.HasOne("FIORest.Database.Models.SubSector", "SubSector") + .WithMany("Vertices") + .HasForeignKey("SubSectorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SubSector"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SystemConnection", b => + { + b.HasOne("FIORest.Database.Models.SystemStarsModel", "SystemStarsModel") + .WithMany("Connections") + .HasForeignKey("SystemStarsModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SystemStarsModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.UserSettingsBurnRate", b => + { + b.HasOne("FIORest.Database.Models.UserSettingsModel", "UserSettingsModel") + .WithMany("BurnRateSettings") + .HasForeignKey("UserSettingsModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("UserSettingsModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.UserSettingsBurnRateExclusion", b => + { + b.HasOne("FIORest.Database.Models.UserSettingsBurnRate", "UserSettingsBurnRate") + .WithMany("MaterialExclusions") + .HasForeignKey("UserSettingsBurnRateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("UserSettingsBurnRate"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorkforceDescription", b => + { + b.HasOne("FIORest.Database.Models.WorkforceModel", "WorkforceModel") + .WithMany("Workforces") + .HasForeignKey("WorkforceModelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("WorkforceModel"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorkforceNeed", b => + { + b.HasOne("FIORest.Database.Models.WorkforceDescription", "WorkforceDescription") + .WithMany("WorkforceNeeds") + .HasForeignKey("WorkforceDescriptionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("WorkforceDescription"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorkforcePerOneHundreedNeed", b => + { + b.HasOne("FIORest.Database.Models.WorkforcePerOneHundred", "WorkforcePerOneHundred") + .WithMany("Needs") + .HasForeignKey("WorkforcePerOneHundredId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("WorkforcePerOneHundred"); + }); + + modelBuilder.Entity("FIORest.Database.Models.AuthenticationModel", b => + { + b.Navigation("Allowances"); + + b.Navigation("APIKeys"); + + b.Navigation("FailedAttempts"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BUIModel", b => + { + b.Navigation("BuildingCosts"); + + b.Navigation("Recipes"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BUIRecipe", b => + { + b.Navigation("Inputs"); + + b.Navigation("Outputs"); + }); + + modelBuilder.Entity("FIORest.Database.Models.BuildingDegradationModel", b => + { + b.Navigation("ReclaimableMaterials"); + + b.Navigation("RepairMaterials"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXDataModel", b => + { + b.Navigation("BuyingOrders"); + + b.Navigation("SellingOrders"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXOSTradeOrder", b => + { + b.Navigation("Trades"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXOSTradeOrdersModel", b => + { + b.Navigation("TradeOrders"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CXPCData", b => + { + b.Navigation("Entries"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ChatModel", b => + { + b.Navigation("Messages"); + }); + + modelBuilder.Entity("FIORest.Database.Models.CompanyDataModel", b => + { + b.Navigation("Balances"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ContractCondition", b => + { + b.Navigation("Dependencies"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ContractModel", b => + { + b.Navigation("Conditions"); + }); + + modelBuilder.Entity("FIORest.Database.Models.FLIGHTSFlight", b => + { + b.Navigation("Segments"); + }); + + modelBuilder.Entity("FIORest.Database.Models.FLIGHTSFlightSegment", b => + { + b.Navigation("DestinationLines"); + + b.Navigation("OriginLines"); + }); + + modelBuilder.Entity("FIORest.Database.Models.FLIGHTSModel", b => + { + b.Navigation("Flights"); + }); + + modelBuilder.Entity("FIORest.Database.Models.GroupModel", b => + { + b.Navigation("GroupUsers"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureInfo", b => + { + b.Navigation("Contributions"); + + b.Navigation("UpgradeCosts"); + + b.Navigation("Upkeeps"); + }); + + modelBuilder.Entity("FIORest.Database.Models.InfrastructureModel", b => + { + b.Navigation("InfrastructureInfos"); + + b.Navigation("InfrastructureReports"); + }); + + modelBuilder.Entity("FIORest.Database.Models.JumpCacheModel", b => + { + b.Navigation("Jumps"); + }); + + modelBuilder.Entity("FIORest.Database.Models.LocalMarketModel", b => + { + b.Navigation("BuyingAds"); + + b.Navigation("SellingAds"); + + b.Navigation("ShippingAds"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PRODLinesModel", b => + { + b.Navigation("ProductionLines"); + }); + + modelBuilder.Entity("FIORest.Database.Models.PlanetDataModel", b => + { + b.Navigation("BuildRequirements"); + + b.Navigation("COGCPrograms"); + + b.Navigation("COGCUpkeep"); + + b.Navigation("COGCVotes"); + + b.Navigation("ProductionFees"); + + b.Navigation("Resources"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ProductionLine", b => + { + b.Navigation("Orders"); + }); + + modelBuilder.Entity("FIORest.Database.Models.ProductionLineOrder", b => + { + b.Navigation("Inputs"); + + b.Navigation("Outputs"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SHIPSModel", b => + { + b.Navigation("Ships"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SHIPSShip", b => + { + b.Navigation("RepairMaterials"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESBuilding", b => + { + b.Navigation("ReclaimableMaterials"); + + b.Navigation("RepairMaterials"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESModel", b => + { + b.Navigation("Sites"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SITESSite", b => + { + b.Navigation("Buildings"); + }); + + modelBuilder.Entity("FIORest.Database.Models.StorageModel", b => + { + b.Navigation("StorageItems"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SubSector", b => + { + b.Navigation("Vertices"); + }); + + modelBuilder.Entity("FIORest.Database.Models.SystemStarsModel", b => + { + b.Navigation("Connections"); + }); + + modelBuilder.Entity("FIORest.Database.Models.UserSettingsBurnRate", b => + { + b.Navigation("MaterialExclusions"); + }); + + modelBuilder.Entity("FIORest.Database.Models.UserSettingsModel", b => + { + b.Navigation("BurnRateSettings"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorkforceDescription", b => + { + b.Navigation("WorkforceNeeds"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorkforceModel", b => + { + b.Navigation("Workforces"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorkforcePerOneHundred", b => + { + b.Navigation("Needs"); + }); + + modelBuilder.Entity("FIORest.Database.Models.WorldSectorsModel", b => + { + b.Navigation("SubSectors"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Migrations/SqliteMigrations/20211025200122_ChatMessageIndexes.cs b/Migrations/SqliteMigrations/20211025200122_ChatMessageIndexes.cs new file mode 100644 index 0000000..611c030 --- /dev/null +++ b/Migrations/SqliteMigrations/20211025200122_ChatMessageIndexes.cs @@ -0,0 +1,31 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace FIORest.Migrations.SqliteMigrations +{ + public partial class ChatMessageIndexes : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateIndex( + name: "IX_ChatMessages_MessageTimestamp", + table: "ChatMessages", + column: "MessageTimestamp"); + + migrationBuilder.CreateIndex( + name: "IX_ChatMessages_Timestamp", + table: "ChatMessages", + column: "Timestamp"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_ChatMessages_MessageTimestamp", + table: "ChatMessages"); + + migrationBuilder.DropIndex( + name: "IX_ChatMessages_Timestamp", + table: "ChatMessages"); + } + } +} diff --git a/Migrations/SqliteMigrations/SqliteDataContextModelSnapshot.cs b/Migrations/SqliteMigrations/SqliteDataContextModelSnapshot.cs index 29df540..8d683a2 100644 --- a/Migrations/SqliteMigrations/SqliteDataContextModelSnapshot.cs +++ b/Migrations/SqliteMigrations/SqliteDataContextModelSnapshot.cs @@ -844,6 +844,10 @@ namespace FIORest.Migrations b.HasIndex("ChatModelId"); + b.HasIndex("MessageTimestamp"); + + b.HasIndex("Timestamp"); + b.ToTable("ChatMessages"); }); -- GitLab