//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using DataServer.Data;
#nullable disable
namespace SystemRevivalServer.Migrations
{
[DbContext(typeof(GameDbContext))]
[Migration("20251223134442_CraftingSystem")]
partial class CraftingSystem
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "9.0.10")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
modelBuilder.Entity("DataServer.Data.Account", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("BannedUntil")
.HasColumnType("datetime(6)");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)")
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
b.Property("Email")
.HasMaxLength(255)
.HasColumnType("varchar(255)");
b.Property("IsBanned")
.HasColumnType("tinyint(1)");
b.Property("PasswordHash")
.IsRequired()
.HasColumnType("varbinary(64)");
b.Property("PasswordSalt")
.IsRequired()
.HasColumnType("varbinary(32)");
b.Property("Role")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasDefaultValue(0);
b.Property("UpdatedAt")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("datetime(6)")
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("UpdatedAt"));
b.Property("Username")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("varchar(32)");
b.HasKey("Id");
b.HasIndex("Email")
.IsUnique();
b.HasIndex("Username")
.IsUnique();
b.ToTable("accounts", (string)null);
});
modelBuilder.Entity("DataServer.Data.Entities.ClientAsset", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("AssetType")
.HasColumnType("int");
b.Property("CdnPath")
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("FileHash")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("varchar(32)");
b.Property("FilePath")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.Property("FileSize")
.HasColumnType("bigint");
b.Property("IsEnabled")
.HasColumnType("tinyint(1)");
b.Property("IsRequired")
.HasColumnType("tinyint(1)");
b.Property("MinClientVersion")
.HasMaxLength(16)
.HasColumnType("varchar(16)");
b.Property("UpdatedAt")
.HasColumnType("datetime(6)");
b.Property("Version")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("client_assets");
});
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("DungeonInstanceId")
.HasColumnType("char(36)");
b.Property("EmptiedAt")
.HasColumnType("datetime(6)");
b.Property("GoldAmount")
.HasColumnType("bigint");
b.Property("IsEmpty")
.HasColumnType("tinyint(1)");
b.Property("OwnerCharacterId")
.HasColumnType("bigint unsigned");
b.Property("VictimCharacterId")
.HasColumnType("bigint unsigned");
b.Property("VictimMobDefinitionId")
.HasColumnType("int");
b.Property("X")
.HasColumnType("float");
b.Property("Y")
.HasColumnType("float");
b.HasKey("Id");
b.HasIndex("OwnerCharacterId");
b.HasIndex("VictimCharacterId");
b.ToTable("dungeon_death_chests");
});
modelBuilder.Entity("DataServer.Data.Entities.DeathChestItem", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("DeathChestId")
.HasColumnType("bigint unsigned");
b.Property("IsTaken")
.HasColumnType("tinyint(1)");
b.Property("ItemDefinitionId")
.HasColumnType("int");
b.Property("Quantity")
.HasColumnType("int");
b.Property("SlotIndex")
.HasColumnType("int");
b.Property("TakenAt")
.HasColumnType("datetime(6)");
b.HasKey("Id");
b.HasIndex("DeathChestId");
b.HasIndex("ItemDefinitionId");
b.ToTable("dungeon_death_chest_items");
});
modelBuilder.Entity("DataServer.Data.Entities.DungeonBeltItem", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("CharacterId")
.HasColumnType("bigint unsigned");
b.Property("InventorySlotIndex")
.HasColumnType("int");
b.Property("SlotIndex")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("CharacterId");
b.ToTable("dungeon_belt_items");
});
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("AccountId")
.HasColumnType("bigint unsigned");
b.Property("BossesKilled")
.HasColumnType("int");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("CurrentHealth")
.HasColumnType("int");
b.Property("CurrentMana")
.HasColumnType("int");
b.Property("Dexterity")
.HasColumnType("int");
b.Property("DungeonsCompleted")
.HasColumnType("int");
b.Property("Endurance")
.HasColumnType("int");
b.Property("EquippedAccessory")
.HasColumnType("bigint unsigned");
b.Property("EquippedBoots")
.HasColumnType("bigint unsigned");
b.Property("EquippedChest")
.HasColumnType("bigint unsigned");
b.Property("EquippedGloves")
.HasColumnType("bigint unsigned");
b.Property("EquippedHead")
.HasColumnType("bigint unsigned");
b.Property("EquippedLegs")
.HasColumnType("bigint unsigned");
b.Property("EquippedOffhand")
.HasColumnType("bigint unsigned");
b.Property("EquippedWeapon")
.HasColumnType("bigint unsigned");
b.Property("Experience")
.HasColumnType("bigint");
b.Property("Gold")
.HasColumnType("bigint");
b.Property("Intelligence")
.HasColumnType("int");
b.Property("IsDeleted")
.HasColumnType("tinyint(1)");
b.Property("LastPlayedAt")
.HasColumnType("datetime(6)");
b.Property("Level")
.HasColumnType("int");
b.Property("Name")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("varchar(32)");
b.Property("PlayersKilled")
.HasColumnType("int");
b.Property("Strength")
.HasColumnType("int");
b.Property("TotalDeaths")
.HasColumnType("int");
b.Property("TotalKills")
.HasColumnType("int");
b.Property("UnspentStatPoints")
.HasColumnType("int");
b.Property("Wisdom")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("AccountId");
b.ToTable("dungeon_characters");
});
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterCraftingSkill", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("CharacterId")
.HasColumnType("bigint unsigned");
b.Property("Experience")
.HasColumnType("bigint");
b.Property("Level")
.HasColumnType("int");
b.Property("SkillType")
.HasColumnType("int");
b.Property("TotalItemsCrafted")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("CharacterId");
b.ToTable("dungeon_character_crafting_skills");
});
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("AcquiredAt")
.HasColumnType("datetime(6)");
b.Property("CharacterId")
.HasColumnType("bigint unsigned");
b.Property("EquipSlot")
.HasColumnType("int");
b.Property("IsEquipped")
.HasColumnType("tinyint(1)");
b.Property("ItemDefinitionId")
.HasColumnType("int");
b.Property("Quantity")
.HasColumnType("int");
b.Property("SlotIndex")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("CharacterId");
b.HasIndex("ItemDefinitionId");
b.ToTable("dungeon_character_items");
});
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItemCraftedLink", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("CharacterItemId")
.HasColumnType("bigint unsigned");
b.Property("CraftedItemId")
.HasColumnType("bigint unsigned");
b.HasKey("Id");
b.HasIndex("CharacterItemId");
b.HasIndex("CraftedItemId");
b.ToTable("dungeon_character_item_crafted_link");
});
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterKnownRecipe", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("CharacterId")
.HasColumnType("bigint unsigned");
b.Property("DiscoveredAt")
.HasColumnType("datetime(6)");
b.Property("RecipeId")
.HasColumnType("int");
b.Property("TimesCrafted")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("CharacterId");
b.HasIndex("RecipeId");
b.ToTable("dungeon_character_known_recipes");
});
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftedItem", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("BaseItemDefinitionId")
.HasColumnType("int");
b.Property("CraftedAt")
.HasColumnType("datetime(6)");
b.Property("CrafterId")
.HasColumnType("bigint unsigned");
b.Property("CrafterName")
.HasMaxLength(32)
.HasColumnType("varchar(32)");
b.Property("CraftingLevelAtCreation")
.HasColumnType("int");
b.Property("CustomName")
.HasMaxLength(64)
.HasColumnType("varchar(64)");
b.Property("QualityRating")
.HasColumnType("int");
b.Property("RecipeId")
.HasColumnType("int");
b.Property("RollHistoryJson")
.HasMaxLength(1024)
.HasColumnType("varchar(1024)");
b.Property("RolledBonusArmor")
.HasColumnType("int");
b.Property("RolledBonusDexterity")
.HasColumnType("int");
b.Property("RolledBonusEndurance")
.HasColumnType("int");
b.Property("RolledBonusHealAmount")
.HasColumnType("int");
b.Property("RolledBonusHealth")
.HasColumnType("int");
b.Property("RolledBonusIntelligence")
.HasColumnType("int");
b.Property("RolledBonusMagicResist")
.HasColumnType("int");
b.Property("RolledBonusMana")
.HasColumnType("int");
b.Property("RolledBonusManaRestore")
.HasColumnType("int");
b.Property("RolledBonusMaxDamage")
.HasColumnType("int");
b.Property("RolledBonusMinDamage")
.HasColumnType("int");
b.Property("RolledBonusStrength")
.HasColumnType("int");
b.Property("RolledBonusWisdom")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("BaseItemDefinitionId");
b.HasIndex("CrafterId");
b.HasIndex("RecipeId");
b.ToTable("dungeon_crafted_items");
});
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftingRecipe", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("BaseXp")
.HasColumnType("int");
b.Property("Description")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.Property("HasStatRolls")
.HasColumnType("tinyint(1)");
b.Property("IsBaseRecipe")
.HasColumnType("tinyint(1)");
b.Property("IsEnabled")
.HasColumnType("tinyint(1)");
b.Property("Name")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("varchar(64)");
b.Property("OutputItemDefinitionId")
.HasColumnType("int");
b.Property("OutputItemId")
.HasColumnType("int");
b.Property("OutputQuantity")
.HasColumnType("int");
b.Property("PossibleStatsJson")
.HasMaxLength(1024)
.HasColumnType("varchar(1024)");
b.Property("RequiredLevel")
.HasColumnType("int");
b.Property("SkillType")
.HasColumnType("int");
b.Property("Tier")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("OutputItemId");
b.ToTable("dungeon_crafting_recipes");
});
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftingRecipeIngredient", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("ItemDefinitionId")
.HasColumnType("int");
b.Property("Quantity")
.HasColumnType("int");
b.Property("RecipeId")
.HasColumnType("int");
b.Property("SlotOrder")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ItemDefinitionId");
b.HasIndex("RecipeId");
b.ToTable("dungeon_crafting_recipe_ingredients");
});
modelBuilder.Entity("DataServer.Data.Entities.DungeonItemDefinition", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("Armor")
.HasColumnType("int");
b.Property("AttackRange")
.HasColumnType("float");
b.Property("BonusDexterity")
.HasColumnType("int");
b.Property("BonusEndurance")
.HasColumnType("int");
b.Property("BonusHealth")
.HasColumnType("int");
b.Property("BonusIntelligence")
.HasColumnType("int");
b.Property("BonusMana")
.HasColumnType("int");
b.Property("BonusStrength")
.HasColumnType("int");
b.Property("BonusWisdom")
.HasColumnType("int");
b.Property("DamageType")
.HasColumnType("int");
b.Property("Description")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.Property("EquipSlot")
.HasColumnType("int");
b.Property("HealAmount")
.HasColumnType("int");
b.Property("IsEnabled")
.HasColumnType("tinyint(1)");
b.Property("IsTeleportScroll")
.HasColumnType("tinyint(1)");
b.Property("MagicResist")
.HasColumnType("int");
b.Property("ManaRestore")
.HasColumnType("int");
b.Property("MaxDamage")
.HasColumnType("int");
b.Property("MaxStack")
.HasColumnType("int");
b.Property("MinDamage")
.HasColumnType("int");
b.Property("Name")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("varchar(64)");
b.Property("Rarity")
.HasColumnType("int");
b.Property("RequiredDexterity")
.HasColumnType("int");
b.Property("RequiredIntelligence")
.HasColumnType("int");
b.Property("RequiredLevel")
.HasColumnType("int");
b.Property("RequiredStrength")
.HasColumnType("int");
b.Property("RequiredWisdom")
.HasColumnType("int");
b.Property("SpriteId")
.HasColumnType("int");
b.Property("SpritePath")
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.Property("Stackable")
.HasColumnType("tinyint(1)");
b.Property("StaminaRestore")
.HasColumnType("int");
b.Property("TeachesSpellId")
.HasColumnType("int");
b.Property("TintColor")
.HasMaxLength(16)
.HasColumnType("varchar(16)");
b.Property("Type")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("dungeon_item_definitions");
});
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("CharacterId")
.HasColumnType("bigint unsigned");
b.Property("DefinitionId")
.HasColumnType("int");
b.Property("LearnedAt")
.HasColumnType("datetime(6)");
b.Property("SpellDefinitionId")
.HasColumnType("int");
b.Property("SpellLevel")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("CharacterId");
b.HasIndex("DefinitionId");
b.ToTable("dungeon_learned_spells");
});
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("Description")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.Property("DropChanceMultiplier")
.HasColumnType("float");
b.Property("GuaranteedDrop")
.HasColumnType("tinyint(1)");
b.Property("IsEnabled")
.HasColumnType("tinyint(1)");
b.Property("MaxDrops")
.HasColumnType("int");
b.Property("MaxTier")
.HasColumnType("int");
b.Property("MinDrops")
.HasColumnType("int");
b.Property("MinTier")
.HasColumnType("int");
b.Property("Name")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("varchar(64)");
b.HasKey("Id");
b.ToTable("dungeon_loot_tables");
});
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("DropChance")
.HasColumnType("float");
b.Property("DropChancePerTier")
.HasColumnType("float");
b.Property("Guaranteed")
.HasColumnType("tinyint(1)");
b.Property("ItemDefinitionId")
.HasColumnType("int");
b.Property("LootTableId")
.HasColumnType("int");
b.Property("MaxDropChance")
.HasColumnType("float");
b.Property("MaxQuantity")
.HasColumnType("int");
b.Property("MinQuantity")
.HasColumnType("int");
b.Property("Weight")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ItemDefinitionId");
b.HasIndex("LootTableId");
b.ToTable("dungeon_loot_table_entries");
});
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobDefinition", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("AbilitiesJson")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("varchar(1024)");
b.Property("AggroRange")
.HasColumnType("float");
b.Property("AnimationSpeed")
.HasColumnType("float");
b.Property("ArmorPerTier")
.HasColumnType("float");
b.Property("AttackRange")
.HasColumnType("float");
b.Property("AttackSpeed")
.HasColumnType("float");
b.Property("BaseArmor")
.HasColumnType("int");
b.Property("BaseHealth")
.HasColumnType("int");
b.Property("BaseMagicDamage")
.HasColumnType("int");
b.Property("BaseMagicResist")
.HasColumnType("int");
b.Property("BaseMana")
.HasColumnType("int");
b.Property("BasePhysicalDamage")
.HasColumnType("int");
b.Property("BaseXp")
.HasColumnType("int");
b.Property("Category")
.HasColumnType("int");
b.Property("DamagePerTier")
.HasColumnType("float");
b.Property("Description")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.Property("DropChanceMultiplier")
.HasColumnType("float");
b.Property("HealthPerTier")
.HasColumnType("float");
b.Property("IsEnabled")
.HasColumnType("tinyint(1)");
b.Property("LeashRange")
.HasColumnType("float");
b.Property("LootTableId")
.HasColumnType("int");
b.Property("MaxTier")
.HasColumnType("int");
b.Property("MinTier")
.HasColumnType("int");
b.Property("MoveSpeed")
.HasColumnType("float");
b.Property("Name")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("varchar(64)");
b.Property("ResistancesJson")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("varchar(1024)");
b.Property("Scale")
.HasColumnType("float");
b.Property("SpriteConfigJson")
.HasMaxLength(4096)
.HasColumnType("varchar(4096)");
b.Property("TintColor")
.IsRequired()
.HasMaxLength(16)
.HasColumnType("varchar(16)");
b.Property("Type")
.HasColumnType("int");
b.Property("XpPerTier")
.HasColumnType("float");
b.HasKey("Id");
b.ToTable("dungeon_mob_definitions");
});
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("LootTableId")
.HasColumnType("int");
b.Property("MobDefinitionId")
.HasColumnType("int");
b.Property