// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using ShadowedRealms.Data.Contexts;

#nullable disable

namespace ShadowedRealms.API.Migrations
{
    [DbContext(typeof(GameDbContext))]
    partial class GameDbContextModelSnapshot : ModelSnapshot
    {
        protected override void BuildModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "9.0.10")
                .HasAnnotation("Relational:MaxIdentifierLength", 63);

            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole<int>", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<string>("ConcurrencyStamp")
                        .IsConcurrencyToken()
                        .HasColumnType("text");

                    b.Property<string>("Name")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)");

                    b.Property<string>("NormalizedName")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)");

                    b.HasKey("Id");

                    b.HasIndex("NormalizedName")
                        .IsUnique()
                        .HasDatabaseName("RoleNameIndex");

                    b.ToTable("Roles", (string)null);
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<string>("ClaimType")
                        .HasColumnType("text");

                    b.Property<string>("ClaimValue")
                        .HasColumnType("text");

                    b.Property<int>("RoleId")
                        .HasColumnType("integer");

                    b.HasKey("Id");

                    b.HasIndex("RoleId");

                    b.ToTable("Role_Claims", (string)null);
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<string>("ClaimType")
                        .HasColumnType("text");

                    b.Property<string>("ClaimValue")
                        .HasColumnType("text");

                    b.Property<int>("UserId")
                        .HasColumnType("integer");

                    b.HasKey("Id");

                    b.HasIndex("UserId");

                    b.ToTable("Player_Claims", (string)null);
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
                {
                    b.Property<string>("LoginProvider")
                        .HasColumnType("text");

                    b.Property<string>("ProviderKey")
                        .HasColumnType("text");

                    b.Property<string>("ProviderDisplayName")
                        .HasColumnType("text");

                    b.Property<int>("UserId")
                        .HasColumnType("integer");

                    b.HasKey("LoginProvider", "ProviderKey");

                    b.HasIndex("UserId");

                    b.ToTable("Player_Logins", (string)null);
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b =>
                {
                    b.Property<int>("UserId")
                        .HasColumnType("integer");

                    b.Property<int>("RoleId")
                        .HasColumnType("integer");

                    b.HasKey("UserId", "RoleId");

                    b.HasIndex("RoleId");

                    b.ToTable("Player_Roles", (string)null);
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
                {
                    b.Property<int>("UserId")
                        .HasColumnType("integer");

                    b.Property<string>("LoginProvider")
                        .HasColumnType("text");

                    b.Property<string>("Name")
                        .HasColumnType("text");

                    b.Property<string>("Value")
                        .HasColumnType("text");

                    b.HasKey("UserId", "LoginProvider", "Name");

                    b.ToTable("Player_Tokens", (string)null);
                });

            modelBuilder.Entity("ShadowedRealms.Core.Models.Alliance.Alliance", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<bool>("AcceptsCoalitionInvites")
                        .HasColumnType("boolean");

                    b.Property<int>("CoalitionReputationScore")
                        .HasColumnType("integer");

                    b.Property<DateTime>("CreatedAt")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("timestamp with time zone")
                        .HasDefaultValueSql("CURRENT_TIMESTAMP");

                    b.Property<int?>("CurrentCoalitionId")
                        .HasColumnType("integer");

                    b.Property<string>("Description")
                        .HasMaxLength(1000)
                        .HasColumnType("character varying(1000)");

                    b.Property<int>("EconomicGatheringResearch")
                        .HasColumnType("integer");

                    b.Property<int>("EconomicProductionResearch")
                        .HasColumnType("integer");

                    b.Property<int>("EconomicStorageResearch")
                        .HasColumnType("integer");

                    b.Property<int>("EconomicTaxationResearch")
                        .HasColumnType("integer");

                    b.Property<int>("EconomicTradeResearch")
                        .HasColumnType("integer");

                    b.Property<long>("ExperiencePoints")
                        .HasColumnType("bigint");

                    b.Property<int>("FortressLevel")
                        .HasColumnType("integer");

                    b.Property<int>("FortressX")
                        .HasColumnType("integer");

                    b.Property<int>("FortressY")
                        .HasColumnType("integer");

                    b.Property<bool>("HasTerritory")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsActive")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(true);

                    b.Property<bool>("IsEligibleForKvK")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsOpenToJoin")
                        .HasColumnType("boolean");

                    b.Property<int>("KingdomId")
                        .HasColumnType("integer");

                    b.Property<int>("KvKParticipations")
                        .HasColumnType("integer");

                    b.Property<int>("KvKWins")
                        .HasColumnType("integer");

                    b.Property<DateTime?>("LastKvKParticipation")
                        .HasColumnType("timestamp with time zone");

                    b.Property<int>("LeaderId")
                        .HasColumnType("integer");

                    b.Property<int>("Level")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasDefaultValue(1);

                    b.Property<int>("MaxMembers")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasDefaultValue(50);

                    b.Property<int>("MilitaryAttackResearch")
                        .HasColumnType("integer");

                    b.Property<int>("MilitaryCapacityResearch")
                        .HasColumnType("integer");

                    b.Property<int>("MilitaryDefenseResearch")
                        .HasColumnType("integer");

                    b.Property<int>("MilitaryHealthResearch")
                        .HasColumnType("integer");

                    b.Property<int>("MilitarySpeedResearch")
                        .HasColumnType("integer");

                    b.Property<int>("MinCastleLevelToJoin")
                        .HasColumnType("integer");

                    b.Property<long>("MinPowerToJoin")
                        .HasColumnType("bigint");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("character varying(50)");

                    b.Property<long>("Power")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("bigint")
                        .HasDefaultValue(0L);

                    b.Property<bool>("RequireApproval")
                        .HasColumnType("boolean");

                    b.Property<int>("ResourceBuildingCount")
                        .HasColumnType("integer");

                    b.Property<long>("ResourcesGathered")
                        .HasColumnType("bigint");

                    b.Property<long>("ResourcesShared")
                        .HasColumnType("bigint");

                    b.Property<string>("Tag")
                        .IsRequired()
                        .HasMaxLength(5)
                        .HasColumnType("character varying(5)");

                    b.Property<int>("TechnologyConstructionResearch")
                        .HasColumnType("integer");

                    b.Property<int>("TechnologyHealingResearch")
                        .HasColumnType("integer");

                    b.Property<int>("TechnologyResearchResearch")
                        .HasColumnType("integer");

                    b.Property<int>("TechnologyTrainingResearch")
                        .HasColumnType("integer");

                    b.Property<int>("TechnologyUpgradeResearch")
                        .HasColumnType("integer");

                    b.Property<long>("TotalDeaths")
                        .HasColumnType("bigint");

                    b.Property<long>("TotalKills")
                        .HasColumnType("bigint");

                    b.Property<int>("TowerCount")
                        .HasColumnType("integer");

                    b.Property<long>("TreasuryFood")
                        .HasColumnType("bigint");

                    b.Property<long>("TreasuryIron")
                        .HasColumnType("bigint");

                    b.Property<long>("TreasuryMithril")
                        .HasColumnType("bigint");

                    b.Property<long>("TreasurySilver")
                        .HasColumnType("bigint");

                    b.Property<long>("TreasuryWood")
                        .HasColumnType("bigint");

                    b.Property<string>("WelcomeMessage")
                        .HasMaxLength(200)
                        .HasColumnType("character varying(200)");

                    b.HasKey("Id");

                    b.HasIndex("KingdomId");

                    b.HasIndex("LeaderId")
                        .IsUnique();

                    b.HasIndex("Name");

                    b.HasIndex("Power");

                    b.HasIndex("Tag");

                    b.HasIndex("KingdomId", "Power")
                        .HasDatabaseName("IX_Alliances_Kingdom_Power");

                    b.ToTable("Alliances");
                });

            modelBuilder.Entity("ShadowedRealms.Core.Models.Alliance.AllianceInvitation", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<int>("AllianceId")
                        .HasColumnType("integer");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime>("ExpiresAt")
                        .HasColumnType("timestamp with time zone");

                    b.Property<int>("InvitedById")
                        .HasColumnType("integer");

                    b.Property<bool>("IsAccepted")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsRejected")
                        .HasColumnType("boolean");

                    b.Property<int>("PlayerId")
                        .HasColumnType("integer");

                    b.HasKey("Id");

                    b.HasIndex("AllianceId");

                    b.HasIndex("InvitedById");

                    b.HasIndex("PlayerId");

                    b.ToTable("AllianceInvitation");
                });

            modelBuilder.Entity("ShadowedRealms.Core.Models.Alliance.AllianceRole", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<int>("AllianceId")
                        .HasColumnType("integer");

                    b.Property<DateTime>("AssignedAt")
                        .HasColumnType("timestamp with time zone");

                    b.Property<int>("AssignedById")
                        .HasColumnType("integer");

                    b.Property<int>("PlayerId")
                        .HasColumnType("integer");

                    b.Property<int>("Rank")
                        .HasColumnType("integer");

                    b.HasKey("Id");

                    b.HasIndex("AllianceId");

                    b.HasIndex("AssignedById");

                    b.HasIndex("PlayerId");

                    b.ToTable("AllianceRole");
                });

            modelBuilder.Entity("ShadowedRealms.Core.Models.Combat.CombatLog", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<double>("AttackerAllianceAttackBonus")
                        .HasColumnType("double precision");

                    b.Property<double>("AttackerAllianceDefenseBonus")
                        .HasColumnType("double precision");

                    b.Property<double>("AttackerAllianceHealthBonus")
                        .HasColumnType("double precision");

                    b.Property<int?>("AttackerAllianceId")
                        .HasColumnType("integer");

                    b.Property<long>("AttackerBowmenAfter")
                        .HasColumnType("bigint");

                    b.Property<long>("AttackerBowmenBefore")
                        .HasColumnType("bigint");

                    b.Property<long>("AttackerCasualties")
                        .HasColumnType("bigint");

                    b.Property<long>("AttackerCavalryAfter")
                        .HasColumnType("bigint");

                    b.Property<long>("AttackerCavalryBefore")
                        .HasColumnType("bigint");

                    b.Property<double>("AttackerDragonBonus")
                        .HasColumnType("double precision");

                    b.Property<string>("AttackerDragonSkillsUsed")
                        .HasMaxLength(100)
                        .HasColumnType("character varying(100)");

                    b.Property<bool>("AttackerHadDragon")
                        .HasColumnType("boolean");

                    b.Property<int>("AttackerHighestTroopTier")
                        .HasColumnType("integer");

                    b.Property<long>("AttackerInfantryAfter")
                        .HasColumnType("bigint");

                    b.Property<long>("AttackerInfantryBefore")
                        .HasColumnType("bigint");

                    b.Property<int>("AttackerPlayerId")
                        .HasColumnType("integer");

                    b.Property<int>("AttackerPlayerId1")
                        .HasColumnType("integer");

                    b.Property<long>("AttackerPowerBefore")
                        .HasColumnType("bigint");

                    b.Property<long>("AttackerSiegeAfter")
                        .HasColumnType("bigint");

                    b.Property<long>("AttackerSiegeBefore")
                        .HasColumnType("bigint");

                    b.Property<long>("AttackerWoundedTroops")
                        .HasColumnType("bigint");

                    b.Property<string>("BattleNotes")
                        .HasMaxLength(1000)
                        .HasColumnType("character varying(1000)");

                    b.Property<int>("BattleX")
                        .HasColumnType("integer");

                    b.Property<int>("BattleY")
                        .HasColumnType("integer");

                    b.Property<int?>("CoalitionId")
                        .HasColumnType("integer");

                    b.Property<int>("CombatType")
                        .HasColumnType("integer");

                    b.Property<double>("DefenderAllianceAttackBonus")
                        .HasColumnType("double precision");

                    b.Property<double>("DefenderAllianceDefenseBonus")
                        .HasColumnType("double precision");

                    b.Property<double>("DefenderAllianceHealthBonus")
                        .HasColumnType("double precision");

                    b.Property<int?>("DefenderAllianceId")
                        .HasColumnType("integer");

                    b.Property<long>("DefenderBowmenAfter")
                        .HasColumnType("bigint");

                    b.Property<long>("DefenderBowmenBefore")
                        .HasColumnType("bigint");

                    b.Property<long>("DefenderCasualties")
                        .HasColumnType("bigint");

                    b.Property<long>("DefenderCavalryAfter")
                        .HasColumnType("bigint");

                    b.Property<long>("DefenderCavalryBefore")
                        .HasColumnType("bigint");

                    b.Property<double>("DefenderDragonBonus")
                        .HasColumnType("double precision");

                    b.Property<string>("DefenderDragonSkillsUsed")
                        .HasMaxLength(100)
                        .HasColumnType("character varying(100)");

                    b.Property<bool>("DefenderHadDragon")
                        .HasColumnType("boolean");

                    b.Property<int>("DefenderHighestTroopTier")
                        .HasColumnType("integer");

                    b.Property<long>("DefenderInfantryAfter")
                        .HasColumnType("bigint");

                    b.Property<long>("DefenderInfantryBefore")
                        .HasColumnType("bigint");

                    b.Property<int>("DefenderPlayerId")
                        .HasColumnType("integer");

                    b.Property<int>("DefenderPlayerId1")
                        .HasColumnType("integer");

                    b.Property<long>("DefenderPowerBefore")
                        .HasColumnType("bigint");

                    b.Property<long>("DefenderSiegeAfter")
                        .HasColumnType("bigint");

                    b.Property<long>("DefenderSiegeBefore")
                        .HasColumnType("bigint");

                    b.Property<long>("DefenderWoundedTroops")
                        .HasColumnType("bigint");

                    b.Property<string>("DetailedBattleReport")
                        .HasMaxLength(4000)
                        .HasColumnType("character varying(4000)");

                    b.Property<long>("FoodTransferred")
                        .HasColumnType("bigint");

                    b.Property<double>("ForestSpeedReduction")
                        .HasColumnType("double precision");

                    b.Property<int?>("InterceptionType")
                        .HasColumnType("integer");

                    b.Property<int?>("InterceptorPlayerId")
                        .HasColumnType("integer");

                    b.Property<long>("IronTransferred")
                        .HasColumnType("bigint");

                    b.Property<int>("KingdomId")
                        .HasColumnType("integer");

                    b.Property<int>("KingdomId1")
                        .HasColumnType("integer");

                    b.Property<int?>("KvKEventId")
                        .HasColumnType("integer");

                    b.Property<DateTime>("MarchArrivalTime")
                        .HasColumnType("timestamp with time zone");

                    b.Property<int>("MarchDurationSeconds")
                        .HasColumnType("integer");

                    b.Property<DateTime>("MarchStartTime")
                        .HasColumnType("timestamp with time zone");

                    b.Property<long>("MithrilTransferred")
                        .HasColumnType("bigint");

                    b.Property<int>("Result")
                        .HasColumnType("integer");

                    b.Property<long>("SilverTransferred")
                        .HasColumnType("bigint");

                    b.Property<int>("SpeedBoostLevel")
                        .HasColumnType("integer");

                    b.Property<DateTime>("Timestamp")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("timestamp with time zone")
                        .HasDefaultValueSql("CURRENT_TIMESTAMP");

                    b.Property<bool>("UsedSpeedBoosts")
                        .HasColumnType("boolean");

                    b.Property<bool>("WasFieldInterception")
                        .HasColumnType("boolean");

                    b.Property<bool>("WasInForestZone")
                        .HasColumnType("boolean");

                    b.Property<bool>("WasKvKBattle")
                        .HasColumnType("boolean");

                    b.Property<long>("WoodTransferred")
                        .HasColumnType("bigint");

                    b.HasKey("Id");

                    b.HasIndex("AttackerAllianceId");

                    b.HasIndex("AttackerPlayerId");

                    b.HasIndex("AttackerPlayerId1");

                    b.HasIndex("DefenderAllianceId");

                    b.HasIndex("DefenderPlayerId");

                    b.HasIndex("DefenderPlayerId1");

                    b.HasIndex("InterceptorPlayerId");

                    b.HasIndex("KingdomId");

                    b.HasIndex("KingdomId1");

                    b.HasIndex("Timestamp");

                    b.HasIndex("KingdomId", "Timestamp")
                        .HasDatabaseName("IX_CombatLogs_Kingdom_Time");

                    b.ToTable("CombatLogs");
                });

            modelBuilder.Entity("ShadowedRealms.Core.Models.Kingdom.Kingdom", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<bool>("AcceptingNewPlayers")
                        .HasColumnType("boolean");

                    b.Property<bool>("AutoKickInactivePlayers")
                        .HasColumnType("boolean");

                    b.Property<DateTime>("CreatedAt")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("timestamp with time zone")
                        .HasDefaultValueSql("CURRENT_TIMESTAMP");

                    b.Property<int>("CurrentPopulation")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasDefaultValue(0);

                    b.Property<int>("CurrentPowerRank")
                        .HasColumnType("integer");

                    b.Property<string>("Description")
                        .HasMaxLength(500)
                        .HasColumnType("character varying(500)");

                    b.Property<bool>("EnableTaxSystem")
                        .HasColumnType("boolean");

                    b.Property<int>("InactivityKickDays")
                        .HasColumnType("integer");

                    b.Property<bool>("IsActive")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(true);

                    b.Property<bool>("IsEligibleForKvK")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsEligibleForMerger")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsInKvK")
                        .HasColumnType("boolean");

                    b.Property<int>("KingdomId")
                        .HasColumnType("integer");

                    b.Property<int>("KvKDraws")
                        .HasColumnType("integer");

                    b.Property<int?>("KvKHostAllianceId")
                        .HasColumnType("integer");

                    b.Property<int>("KvKLosses")
                        .HasColumnType("integer");

                    b.Property<int>("KvKWins")
                        .HasColumnType("integer");

                    b.Property<DateTime>("LastActivity")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime?>("LastKvKDate")
                        .HasColumnType("timestamp with time zone");

                    b.Property<int>("MaxPopulation")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasDefaultValue(1500);

                    b.Property<DateTime?>("MergerAvailableDate")
                        .HasColumnType("timestamp with time zone");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("character varying(50)");

                    b.Property<int>("Number")
                        .HasColumnType("integer");

                    b.Property<decimal>("TaxRate")
                        .HasColumnType("numeric");

                    b.Property<long>("TotalPower")
                        .HasColumnType("bigint");

                    b.Property<decimal>("TotalTaxCollected")
                        .HasColumnType("numeric");

                    b.Property<string>("WelcomeMessage")
                        .HasMaxLength(200)
                        .HasColumnType("character varying(200)");

                    b.HasKey("Id");

                    b.HasIndex("Name");

                    b.HasIndex("Number")
                        .IsUnique();

                    b.ToTable("Kingdoms");
                });

            modelBuilder.Entity("ShadowedRealms.Core.Models.Player.Player", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<bool>("AcceptAllianceInvites")
                        .HasColumnType("boolean");

                    b.Property<int?>("AllianceId")
                        .HasColumnType("integer");

                    b.Property<long>("AttacksLost")
                        .HasColumnType("bigint");

                    b.Property<long>("AttacksWon")
                        .HasColumnType("bigint");

                    b.Property<bool>("AutoUseSpeedBoosts")
                        .HasColumnType("boolean");

                    b.Property<string>("Biography")
                        .HasMaxLength(500)
                        .HasColumnType("character varying(500)");

                    b.Property<long>("BowmenT1")
                        .HasColumnType("bigint");

                    b.Property<long>("BowmenT10")
                        .HasColumnType("bigint");

                    b.Property<long>("BowmenT11")
                        .HasColumnType("bigint");

                    b.Property<long>("BowmenT12")
                        .HasColumnType("bigint");

                    b.Property<long>("BowmenT13")
                        .HasColumnType("bigint");

                    b.Property<long>("BowmenT2")
                        .HasColumnType("bigint");

                    b.Property<long>("BowmenT3")
                        .HasColumnType("bigint");

                    b.Property<long>("BowmenT4")
                        .HasColumnType("bigint");

                    b.Property<long>("BowmenT5")
                        .HasColumnType("bigint");

                    b.Property<int>("CastleLevel")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasDefaultValue(1);

                    b.Property<long>("CavalryT1")
                        .HasColumnType("bigint");

                    b.Property<long>("CavalryT10")
                        .HasColumnType("bigint");

                    b.Property<long>("CavalryT11")
                        .HasColumnType("bigint");

                    b.Property<long>("CavalryT12")
                        .HasColumnType("bigint");

                    b.Property<long>("CavalryT13")
                        .HasColumnType("bigint");

                    b.Property<long>("CavalryT2")
                        .HasColumnType("bigint");

                    b.Property<long>("CavalryT3")
                        .HasColumnType("bigint");

                    b.Property<long>("CavalryT4")
                        .HasColumnType("bigint");

                    b.Property<long>("CavalryT5")
                        .HasColumnType("bigint");

                    b.Property<int>("CoordinateX")
                        .HasColumnType("integer");

                    b.Property<int>("CoordinateY")
                        .HasColumnType("integer");

                    b.Property<DateTime>("CreatedAt")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("timestamp with time zone")
                        .HasDefaultValueSql("CURRENT_TIMESTAMP");

                    b.Property<long>("DefensesLost")
                        .HasColumnType("bigint");

                    b.Property<long>("DefensesWon")
                        .HasColumnType("bigint");

                    b.Property<DateTime?>("DragonExpiryDate")
                        .HasColumnType("timestamp with time zone");

                    b.Property<bool>("EnablePushNotifications")
                        .HasColumnType("boolean");

                    b.Property<long>("Food")
                        .HasColumnType("bigint");

                    b.Property<long>("FoodProtected")
                        .HasColumnType("bigint");

                    b.Property<int>("Gold")
                        .HasColumnType("integer");

                    b.Property<bool>("HasActiveDragon")
                        .HasColumnType("boolean");

                    b.Property<long>("InfantryT1")
                        .HasColumnType("bigint");

                    b.Property<long>("InfantryT10")
                        .HasColumnType("bigint");

                    b.Property<long>("InfantryT11")
                        .HasColumnType("bigint");

                    b.Property<long>("InfantryT12")
                        .HasColumnType("bigint");

                    b.Property<long>("InfantryT13")
                        .HasColumnType("bigint");

                    b.Property<long>("InfantryT2")
                        .HasColumnType("bigint");

                    b.Property<long>("InfantryT3")
                        .HasColumnType("bigint");

                    b.Property<long>("InfantryT4")
                        .HasColumnType("bigint");

                    b.Property<long>("InfantryT5")
                        .HasColumnType("bigint");

                    b.Property<long>("Iron")
                        .HasColumnType("bigint");

                    b.Property<long>("IronProtected")
                        .HasColumnType("bigint");

                    b.Property<bool>("IsActive")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(true);

                    b.Property<int>("KingdomId")
                        .HasColumnType("integer");

                    b.Property<DateTime>("LastActiveAt")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("timestamp with time zone")
                        .HasDefaultValueSql("CURRENT_TIMESTAMP");

                    b.Property<long>("Mithril")
                        .HasColumnType("bigint");

                    b.Property<long>("MithrilProtected")
                        .HasColumnType("bigint");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("character varying(50)");

                    b.Property<long>("Power")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("bigint")
                        .HasDefaultValue(0L);

                    b.Property<long>("ResourcesGathered")
                        .HasColumnType("bigint");

                    b.Property<long>("ResourcesRaided")
                        .HasColumnType("bigint");

                    b.Property<bool>("ShowOnlineStatus")
                        .HasColumnType("boolean");

                    b.Property<long>("SiegeT1")
                        .HasColumnType("bigint");

                    b.Property<long>("SiegeT10")
                        .HasColumnType("bigint");

                    b.Property<long>("SiegeT11")
                        .HasColumnType("bigint");

                    b.Property<long>("SiegeT12")
                        .HasColumnType("bigint");

                    b.Property<long>("SiegeT13")
                        .HasColumnType("bigint");

                    b.Property<long>("SiegeT2")
                        .HasColumnType("bigint");

                    b.Property<long>("SiegeT3")
                        .HasColumnType("bigint");

                    b.Property<long>("SiegeT4")
                        .HasColumnType("bigint");

                    b.Property<long>("SiegeT5")
                        .HasColumnType("bigint");

                    b.Property<long>("Silver")
                        .HasColumnType("bigint");

                    b.Property<long>("SilverProtected")
                        .HasColumnType("bigint");

                    b.Property<long>("TroopsKilled")
                        .HasColumnType("bigint");

                    b.Property<long>("TroopsLost")
                        .HasColumnType("bigint");

                    b.Property<DateTime?>("VipExpiryDate")
                        .HasColumnType("timestamp with time zone");

                    b.Property<int>("VipLevel")
                        .HasColumnType("integer");

                    b.Property<long>("Wood")
                        .HasColumnType("bigint");

                    b.Property<long>("WoodProtected")
                        .HasColumnType("bigint");

                    b.HasKey("Id");

                    b.HasIndex("AllianceId");

                    b.HasIndex("KingdomId");

                    b.HasIndex("Name");

                    b.HasIndex("Power");

                    b.HasIndex("KingdomId", "AllianceId")
                        .HasDatabaseName("IX_Players_Kingdom_Alliance");

                    b.HasIndex("KingdomId", "Power")
                        .HasDatabaseName("IX_Players_Kingdom_Power");

                    b.ToTable("Players");
                });

            modelBuilder.Entity("ShadowedRealms.Core.Models.Purchase.PurchaseLog", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<int?>("AllianceId")
                        .HasColumnType("integer");

                    b.Property<decimal>("Amount")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("BoostHours")
                        .HasColumnType("integer");

                    b.Property<int>("BoostPercentage")
                        .HasColumnType("integer");

                    b.Property<string>("BundleContents")
                        .HasMaxLength(1000)
                        .HasColumnType("character varying(1000)");

                    b.Property<double>("BundleDiscountPercentage")
                        .HasColumnType("double precision");

                    b.Property<string>("CampaignId")
                        .HasMaxLength(100)
                        .HasColumnType("character varying(100)");

                    b.Property<DateTime?>("ChargebackAt")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime?>("ChargebackDate")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime?>("ChargebackDisputeDeadline")
                        .HasColumnType("timestamp with time zone");

                    b.Property<bool>("ChargebackDisputed")
                        .HasColumnType("boolean");

                    b.Property<decimal>("ChargebackFee")
                        .HasColumnType("numeric");

                    b.Property<decimal?>("ChargebackPenalty")
                        .HasColumnType("numeric");

                    b.Property<string>("ChargebackReason")
                        .HasMaxLength(500)
                        .HasColumnType("character varying(500)");

                    b.Property<string>("Currency")
                        .IsRequired()
                        .HasMaxLength(10)
                        .HasColumnType("character varying(10)");

                    b.Property<int>("DaysSinceLastPurchase")
                        .HasColumnType("integer");

                    b.Property<string>("DetailedPurchaseData")
                        .HasMaxLength(2000)
                        .HasColumnType("character varying(2000)");

                    b.Property<string>("DeviceInfo")
                        .HasMaxLength(50)
                        .HasColumnType("character varying(50)");

                    b.Property<int?>("DisputeStatus")
                        .HasColumnType("integer");

                    b.Property<int>("DragonDaysAdded")
                        .HasColumnType("integer");

                    b.Property<string>("DragonSkillsUnlocked")
                        .HasMaxLength(200)
                        .HasColumnType("character varying(200)");

                    b.Property<string>("DragonType")
                        .HasMaxLength(50)
                        .HasColumnType("character varying(50)");

                    b.Property<long>("FoodReceived")
                        .HasColumnType("bigint");

                    b.Property<string>("FraudNotes")
                        .HasMaxLength(500)
                        .HasColumnType("character varying(500)");

                    b.Property<string>("FraudReason")
                        .HasMaxLength(1000)
                        .HasColumnType("character varying(1000)");

                    b.Property<int>("FraudScore")
                        .HasColumnType("integer");

                    b.Property<int>("GoldBalanceAfter")
                        .HasColumnType("integer");

                    b.Property<int>("GoldBalanceBefore")
                        .HasColumnType("integer");

                    b.Property<int>("GoldPurchased")
                        .HasColumnType("integer");

                    b.Property<int>("GoldSpent")
                        .HasColumnType("integer");

                    b.Property<bool>("HasSkillBasedAlternative")
                        .HasColumnType("boolean");

                    b.Property<string>("IPAddress")
                        .HasMaxLength(100)
                        .HasColumnType("character varying(100)");

                    b.Property<long>("IronReceived")
                        .HasColumnType("bigint");

                    b.Property<bool>("IsBundle")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsChargedBack")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsConfirmed")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsConstructionBoost")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsDragonPurchase")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsEligibleForMonthlyReward")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsEligibleForYearlyReward")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsFirstMonthlyPurchase")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsFirstPurchase")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsFraudSuspected")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsHighRiskTransaction")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsNewDevicePurchase")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsRefunded")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsResearchBoost")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsResourcePackage")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsSpeedBoostPurchase")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsStealthPurchase")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsSuspicious")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsTrainingBoost")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsVelocityFlagged")
                        .HasColumnType("boolean");

                    b.Property<bool>("IsVipPurchase")
                        .HasColumnType("boolean");

                    b.Property<int>("KingdomId")
                        .HasColumnType("integer");

                    b.Property<int>("KingdomId1")
                        .HasColumnType("integer");

                    b.Property<int>("LifetimePurchaseCount")
                        .HasColumnType("integer");

                    b.Property<decimal>("LifetimeSpendingAfter")
                        .HasColumnType("numeric");

                    b.Property<decimal>("LifetimeSpendingBefore")
                        .HasColumnType("numeric");

                    b.Property<int>("MinutesFromRegistration")
                        .HasColumnType("integer");

                    b.Property<long>("MithrilReceived")
                        .HasColumnType("bigint");

                    b.Property<int>("MonthlyPurchaseCount")
                        .HasColumnType("integer");

                    b.Property<decimal>("MonthlySpendingAfter")
                        .HasColumnType("numeric");

                    b.Property<decimal>("MonthlySpendingBefore")
                        .HasColumnType("numeric");

                    b.Property<decimal>("NetRevenue")
                        .HasColumnType("numeric");

                    b.Property<string>("Notes")
                        .HasMaxLength(1000)
                        .HasColumnType("character varying(1000)");

                    b.Property<int>("PaymentMethod")
                        .HasColumnType("integer");

                    b.Property<string>("Platform")
                        .IsRequired()
                        .HasMaxLength(20)
                        .HasColumnType("character varying(20)");

                    b.Property<decimal>("PlatformFee")
                        .HasColumnType("numeric");

                    b.Property<string>("PlatformReceiptData")
                        .HasMaxLength(500)
                        .HasColumnType("character varying(500)");

                    b.Property<string>("PlatformTransactionId")
                        .IsRequired()
                        .HasMaxLength(200)
                        .HasColumnType("character varying(200)");

                    b.Property<string>("PlatformUserId")
                        .HasMaxLength(100)
                        .HasColumnType("character varying(100)");

                    b.Property<int>("PlayerId")
                        .HasColumnType("integer");

                    b.Property<int>("PlayerId1")
                        .HasColumnType("integer");

                    b.Property<DateTime?>("ProcessedAt")
                        .HasColumnType("timestamp with time zone");

                    b.Property<string>("ProductId")
                        .IsRequired()
                        .HasMaxLength(100)
                        .HasColumnType("character varying(100)");

                    b.Property<string>("ProductName")
                        .IsRequired()
                        .HasMaxLength(200)
                        .HasColumnType("character varying(200)");

                    b.Property<string>("PromotionCode")
                        .HasMaxLength(100)
                        .HasColumnType("character varying(100)");

                    b.Property<DateTime>("PurchaseDate")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("timestamp with time zone")
                        .HasDefaultValueSql("CURRENT_TIMESTAMP");

                    b.Property<string>("PurchaseNotes")
                        .HasMaxLength(1000)
                        .HasColumnType("character varying(1000)");

                    b.Property<int>("PurchaseType")
                        .HasColumnType("integer");

                    b.Property<int>("PurchasesInLast24Hours")
                        .HasColumnType("integer");

                    b.Property<decimal>("RefundAmount")
                        .HasColumnType("numeric");

                    b.Property<DateTime?>("RefundDate")
                        .HasColumnType("timestamp with time zone");

                    b.Property<string>("RefundReason")
                        .HasMaxLength(500)
                        .HasColumnType("character varying(500)");

                    b.Property<DateTime?>("RefundedAt")
                        .HasColumnType("timestamp with time zone");

                    b.Property<bool>("RequiresManualReview")
                        .HasColumnType("boolean");

                    b.Property<int>("SecretSpendingTierAfter")
                        .HasColumnType("integer");

                    b.Property<int>("SecretSpendingTierBefore")
                        .HasColumnType("integer");

                    b.Property<long>("SilverReceived")
                        .HasColumnType("bigint");

                    b.Property<string>("SkillAlternativeDescription")
                        .HasMaxLength(200)
                        .HasColumnType("character varying(200)");

                    b.Property<double>("SkillAlternativeUsed")
                        .HasColumnType("double precision");

                    b.Property<int>("SpeedBoostHours")
                        .HasColumnType("integer");

                    b.Property<int>("SpeedBoostLevel")
                        .HasColumnType("integer");

                    b.Property<int>("SpeedBoostQuantity")
                        .HasColumnType("integer");

                    b.Property<decimal>("SpendingInLast24Hours")
                        .HasColumnType("numeric");

                    b.Property<int>("Status")
                        .HasColumnType("integer");

                    b.Property<string>("StealthType")
                        .HasMaxLength(50)
                        .HasColumnType("character varying(50)");

                    b.Property<int>("StealthUsesAdded")
                        .HasColumnType("integer");

                    b.Property<decimal>("TaxAmount")
                        .HasColumnType("numeric");

                    b.Property<decimal>("TimeInvestmentHours")
                        .HasColumnType("numeric");

                    b.Property<string>("TransactionId")
                        .IsRequired()
                        .HasMaxLength(200)
                        .HasColumnType("character varying(200)");

                    b.Property<bool>("TriggeredVipMilestone")
                        .HasColumnType("boolean");

                    b.Property<bool>("UnlockedNewSecretTier")
                        .HasColumnType("boolean");

                    b.Property<string>("UserAgent")
                        .HasMaxLength(200)
                        .HasColumnType("character varying(200)");

                    b.Property<int>("VipDaysAdded")
                        .HasColumnType("integer");

                    b.Property<int>("VipLevelAfter")
                        .HasColumnType("integer");

                    b.Property<int>("VipLevelBefore")
                        .HasColumnType("integer");

                    b.Property<string>("VipMilestoneReached")
                        .HasMaxLength(100)
                        .HasColumnType("character varying(100)");

                    b.Property<int>("VipPointsAfter")
                        .HasColumnType("integer");

                    b.Property<int>("VipPointsBefore")
                        .HasColumnType("integer");

                    b.Property<int>("VipPointsEarned")
                        .HasColumnType("integer");

                    b.Property<bool>("WasChargeback")
                        .HasColumnType("boolean");

                    b.Property<bool>("WasRefunded")
                        .HasColumnType("boolean");

                    b.Property<long>("WoodReceived")
                        .HasColumnType("bigint");

                    b.HasKey("Id");

                    b.HasIndex("AllianceId");

                    b.HasIndex("KingdomId");

                    b.HasIndex("KingdomId1");

                    b.HasIndex("PlayerId");

                    b.HasIndex("PlayerId1");

                    b.HasIndex("PurchaseDate");

                    b.HasIndex("KingdomId", "PurchaseDate")
                        .HasDatabaseName("IX_PurchaseLogs_Kingdom_Time");

                    b.ToTable("PurchaseLogs");
                });

            modelBuilder.Entity("ShadowedRealms.Data.Contexts.ApplicationUser", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<int>("AccessFailedCount")
                        .HasColumnType("integer");

                    b.Property<string>("ConcurrencyStamp")
                        .IsConcurrencyToken()
                        .HasColumnType("text");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone");

                    b.Property<string>("Email")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)");

                    b.Property<bool>("EmailConfirmed")
                        .HasColumnType("boolean");

                    b.Property<DateTime>("LastLoginAt")
                        .HasColumnType("timestamp with time zone");

                    b.Property<bool>("LockoutEnabled")
                        .HasColumnType("boolean");

                    b.Property<DateTimeOffset?>("LockoutEnd")
                        .HasColumnType("timestamp with time zone");

                    b.Property<string>("NormalizedEmail")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)");

                    b.Property<string>("NormalizedUserName")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)");

                    b.Property<string>("PasswordHash")
                        .HasColumnType("text");

                    b.Property<string>("PhoneNumber")
                        .HasColumnType("text");

                    b.Property<bool>("PhoneNumberConfirmed")
                        .HasColumnType("boolean");

                    b.Property<int?>("PlayerId")
                        .HasColumnType("integer");

                    b.Property<string>("SecurityStamp")
                        .HasColumnType("text");

                    b.Property<bool>("TwoFactorEnabled")
                        .HasColumnType("boolean");

                    b.Property<string>("UserName")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)");

                    b.HasKey("Id");

                    b.HasIndex("NormalizedEmail")
                        .HasDatabaseName("EmailIndex");

                    b.HasIndex("NormalizedUserName")
                        .IsUnique()
                        .HasDatabaseName("UserNameIndex");

                    b.ToTable("Players_Auth", (string)null);
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
                {
                    b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole<int>", null)
                        .WithMany()
                        .HasForeignKey("RoleId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
                {
                    b.HasOne("ShadowedRealms.Data.Contexts.ApplicationUser", null)
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
                {
                    b.HasOne("ShadowedRealms.Data.Contexts.ApplicationUser", null)
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b =>
                {
                    b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole<int>", null)
                        .WithMany()
                        .HasForeignKey("RoleId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("ShadowedRealms.Data.Contexts.ApplicationUser", null)
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
                {
                    b.HasOne("ShadowedRealms.Data.Contexts.ApplicationUser", null)
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("ShadowedRealms.Core.Models.Alliance.Alliance", b =>
                {
                    b.HasOne("ShadowedRealms.Core.Models.Kingdom.Kingdom", "Kingdom")
                        .WithMany("Alliances")
                        .HasForeignKey("KingdomId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("ShadowedRealms.Core.Models.Player.Player", "Leader")
                        .WithOne()
                        .HasForeignKey("ShadowedRealms.Core.Models.Alliance.Alliance", "LeaderId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Kingdom");

                    b.Navigation("Leader");
                });

            modelBuilder.Entity("ShadowedRealms.Core.Models.Alliance.AllianceInvitation", b =>
                {
                    b.HasOne("ShadowedRealms.Core.Models.Alliance.Alliance", "Alliance")
                        .WithMany("PendingInvitations")
                        .HasForeignKey("AllianceId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("ShadowedRealms.Core.Models.Player.Player", "InvitedBy")
                        .WithMany()
                        .HasForeignKey("InvitedById")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("ShadowedRealms.Core.Models.Player.Player", "Player")
                        .WithMany()
                        .HasForeignKey("PlayerId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Alliance");

                    b.Navigation("InvitedBy");

                    b.Navigation("Player");
                });

            modelBuilder.Entity("ShadowedRealms.Core.Models.Alliance.AllianceRole", b =>
                {
                    b.HasOne("ShadowedRealms.Core.Models.Alliance.Alliance", "Alliance")
                        .WithMany("Roles")
                        .HasForeignKey("AllianceId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("ShadowedRealms.Core.Models.Player.Player", "AssignedBy")
                        .WithMany()
                        .HasForeignKey("AssignedById")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("ShadowedRealms.Core.Models.Player.Player", "Player")
                        .WithMany()
                        .HasForeignKey("PlayerId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Alliance");

                    b.Navigation("AssignedBy");

                    b.Navigation("Player");
                });

            modelBuilder.Entity("ShadowedRealms.Core.Models.Combat.CombatLog", b =>
                {
                    b.HasOne("ShadowedRealms.Core.Models.Alliance.Alliance", "AttackerAlliance")
                        .WithMany()
                        .HasForeignKey("AttackerAllianceId");

                    b.HasOne("ShadowedRealms.Core.Models.Player.Player", null)
                        .WithMany()
                        .HasForeignKey("AttackerPlayerId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("ShadowedRealms.Core.Models.Player.Player", "AttackerPlayer")
                        .WithMany()
                        .HasForeignKey("AttackerPlayerId1")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("ShadowedRealms.Core.Models.Alliance.Alliance", "DefenderAlliance")
                        .WithMany()
                        .HasForeignKey("DefenderAllianceId");

                    b.HasOne("ShadowedRealms.Core.Models.Player.Player", null)
                        .WithMany()
                        .HasForeignKey("DefenderPlayerId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("ShadowedRealms.Core.Models.Player.Player", "DefenderPlayer")
                        .WithMany()
                        .HasForeignKey("DefenderPlayerId1")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("ShadowedRealms.Core.Models.Player.Player", "InterceptorPlayer")
                        .WithMany()
                        .HasForeignKey("InterceptorPlayerId");

                    b.HasOne("ShadowedRealms.Core.Models.Kingdom.Kingdom", null)
                        .WithMany()
                        .HasForeignKey("KingdomId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("ShadowedRealms.Core.Models.Kingdom.Kingdom", "Kingdom")
                        .WithMany()
                        .HasForeignKey("KingdomId1")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("AttackerAlliance");

                    b.Navigation("AttackerPlayer");

                    b.Navigation("DefenderAlliance");

                    b.Navigation("DefenderPlayer");

                    b.Navigation("InterceptorPlayer");

                    b.Navigation("Kingdom");
                });

            modelBuilder.Entity("ShadowedRealms.Core.Models.Player.Player", b =>
                {
                    b.HasOne("ShadowedRealms.Core.Models.Alliance.Alliance", "Alliance")
                        .WithMany("Members")
                        .HasForeignKey("AllianceId")
                        .OnDelete(DeleteBehavior.SetNull);

                    b.HasOne("ShadowedRealms.Core.Models.Kingdom.Kingdom", "Kingdom")
                        .WithMany("Players")
                        .HasForeignKey("KingdomId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Alliance");

                    b.Navigation("Kingdom");
                });

            modelBuilder.Entity("ShadowedRealms.Core.Models.Purchase.PurchaseLog", b =>
                {
                    b.HasOne("ShadowedRealms.Core.Models.Alliance.Alliance", "Alliance")
                        .WithMany()
                        .HasForeignKey("AllianceId");

                    b.HasOne("ShadowedRealms.Core.Models.Kingdom.Kingdom", null)
                        .WithMany()
                        .HasForeignKey("KingdomId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("ShadowedRealms.Core.Models.Kingdom.Kingdom", "Kingdom")
                        .WithMany()
                        .HasForeignKey("KingdomId1")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("ShadowedRealms.Core.Models.Player.Player", null)
                        .WithMany()
                        .HasForeignKey("PlayerId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("ShadowedRealms.Core.Models.Player.Player", "Player")
                        .WithMany()
                        .HasForeignKey("PlayerId1")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Alliance");

                    b.Navigation("Kingdom");

                    b.Navigation("Player");
                });

            modelBuilder.Entity("ShadowedRealms.Core.Models.Alliance.Alliance", b =>
                {
                    b.Navigation("Members");

                    b.Navigation("PendingInvitations");

                    b.Navigation("Roles");
                });

            modelBuilder.Entity("ShadowedRealms.Core.Models.Kingdom.Kingdom", b =>
                {
                    b.Navigation("Alliances");

                    b.Navigation("Players");
                });
#pragma warning restore 612, 618
        }
    }
}
