// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using PetCompanion.Data; #nullable disable namespace PetCompanion.Migrations { [DbContext(typeof(ApplicationDbContext))] [Migration("20250202234056_InitialCreate")] partial class InitialCreate { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "9.0.1"); modelBuilder.Entity("PetCompanion.Models.EquippedItem", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("EquipTarget") .HasColumnType("INTEGER"); b.Property("GameItemId") .HasColumnType("INTEGER"); b.Property("PetId") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("GameItemId"); b.HasIndex("PetId"); b.ToTable("EquippedItems"); }); modelBuilder.Entity("PetCompanion.Models.GameItem", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Description") .IsRequired() .HasColumnType("TEXT"); b.Property("Effect") .IsRequired() .HasColumnType("TEXT"); b.Property("EquipTarget") .HasColumnType("INTEGER"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.Property("Price") .HasColumnType("INTEGER"); b.Property("Rarity") .HasColumnType("INTEGER"); b.Property("Type") .HasColumnType("INTEGER"); b.HasKey("Id"); b.ToTable("GameItems"); }); modelBuilder.Entity("PetCompanion.Models.Inventory", b => { b.Property("PetId") .HasColumnType("TEXT"); b.Property("Capacity") .HasColumnType("INTEGER"); b.HasKey("PetId"); b.ToTable("Inventories"); }); modelBuilder.Entity("PetCompanion.Models.InventoryItem", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("GameItemId") .HasColumnType("INTEGER"); b.Property("InventoryId") .IsRequired() .HasColumnType("TEXT"); b.Property("Quantity") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("GameItemId"); b.HasIndex("InventoryId"); b.ToTable("InventoryItems"); }); modelBuilder.Entity("PetCompanion.Models.Pet", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("BasicActionCooldown") .HasColumnType("TEXT"); b.Property("Class") .HasColumnType("INTEGER"); b.Property("Experience") .HasColumnType("INTEGER"); b.Property("GatherActionSince") .HasColumnType("TEXT"); b.Property("Health") .HasColumnType("INTEGER"); b.Property("IsDead") .HasColumnType("INTEGER"); b.Property("Level") .HasColumnType("INTEGER"); b.Property("MaxHealth") .HasColumnType("INTEGER"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.Property("PetBasicAction") .HasColumnType("INTEGER"); b.Property("PetGatherAction") .HasColumnType("INTEGER"); b.Property("SkillPoints") .HasColumnType("INTEGER"); b.Property("UserId") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("Pets"); }); modelBuilder.Entity("PetCompanion.Models.PetSkill", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CurrentTier") .HasColumnType("INTEGER"); b.Property("PetId") .IsRequired() .HasColumnType("TEXT"); b.Property("SkillId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("PetId"); b.HasIndex("SkillId"); b.ToTable("PetSkills"); }); modelBuilder.Entity("PetCompanion.Models.PetStats", b => { b.Property("PetId") .HasColumnType("TEXT"); b.Property("Agility") .HasColumnType("INTEGER"); b.Property("Charisma") .HasColumnType("INTEGER"); b.Property("Intelligence") .HasColumnType("INTEGER"); b.Property("Luck") .HasColumnType("INTEGER"); b.Property("MaxCharisma") .HasColumnType("INTEGER"); b.Property("MaxIntelligence") .HasColumnType("INTEGER"); b.Property("MaxStrength") .HasColumnType("INTEGER"); b.Property("Perception") .HasColumnType("INTEGER"); b.Property("Strength") .HasColumnType("INTEGER"); b.HasKey("PetId"); b.ToTable("PetStats"); }); modelBuilder.Entity("PetCompanion.Models.Resources", b => { b.Property("PetId") .HasColumnType("TEXT"); b.Property("Food") .HasColumnType("INTEGER"); b.Property("Gold") .HasColumnType("INTEGER"); b.Property("Junk") .HasColumnType("INTEGER"); b.Property("Wisdom") .HasColumnType("INTEGER"); b.HasKey("PetId"); b.ToTable("Resources"); }); modelBuilder.Entity("PetCompanion.Models.Skill", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Description") .IsRequired() .HasColumnType("TEXT"); b.Property("Icon") .IsRequired() .HasColumnType("TEXT"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.Property("PointsCost") .HasColumnType("INTEGER"); b.PrimitiveCollection("SkillsIdRequired") .HasColumnType("TEXT"); b.Property("Type") .HasColumnType("INTEGER"); b.HasKey("Id"); b.ToTable("Skills"); b.HasData( new { Id = 1, Description = "Increases maximum health of your pet, making it more resilient.", Icon = "❤", Name = "Vitality Mastery", PointsCost = 1, Type = 0 }, new { Id = 2, Description = "Increases maximum intelligence of your pet, improving its learning capabilities.", Icon = "🧠", Name = "Mind Enhancement", PointsCost = 1, Type = 0 }, new { Id = 3, Description = "Increases maximum strength of your pet, making it more powerful.", Icon = "💪", Name = "Strength Training", PointsCost = 1, Type = 0 }, new { Id = 4, Description = "Increases maximum charisma of your pet, making it more charming.", Icon = "🎭", Name = "Charisma Boost", PointsCost = 1, Type = 0 }, new { Id = 5, Description = "Increases luck of your pet, making it more fortunate to find rare items.", Icon = "🍀", Name = "Luck of the Draw", PointsCost = 1, SkillsIdRequired = "[4]", Type = 0 }, new { Id = 6, Description = "Increases agility of your pet, making it faster in combat.", Icon = "🏃", Name = "Agility Training", PointsCost = 1, SkillsIdRequired = "[3]", Type = 0 }, new { Id = 7, Description = "Increases perception of your pet, making it more aware of its surroundings.", Icon = "👀", Name = "Perception Boost", PointsCost = 1, SkillsIdRequired = "[2]", Type = 0 }); }); modelBuilder.Entity("PetCompanion.Models.SkillEffect", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Effect") .IsRequired() .HasColumnType("TEXT"); b.Property("SkillId") .HasColumnType("INTEGER"); b.Property("Tier") .HasColumnType("INTEGER"); b.Property("Value") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("SkillId"); b.ToTable("SkillEffects"); b.HasData( new { Id = 1, Effect = "MaxHealth", SkillId = 1, Tier = 1, Value = 25m }, new { Id = 2, Effect = "MaxHealth", SkillId = 1, Tier = 2, Value = 50m }, new { Id = 3, Effect = "MaxHealth", SkillId = 1, Tier = 3, Value = 100m }, new { Id = 4, Effect = "MaxIntelligence", SkillId = 2, Tier = 1, Value = 5m }, new { Id = 5, Effect = "MaxIntelligence", SkillId = 2, Tier = 2, Value = 10m }, new { Id = 6, Effect = "MaxIntelligence", SkillId = 2, Tier = 3, Value = 20m }, new { Id = 7, Effect = "MaxStrength", SkillId = 3, Tier = 1, Value = 5m }, new { Id = 8, Effect = "MaxStrength", SkillId = 3, Tier = 2, Value = 10m }, new { Id = 9, Effect = "MaxStrength", SkillId = 3, Tier = 3, Value = 20m }, new { Id = 10, Effect = "MaxCharisma", SkillId = 4, Tier = 1, Value = 5m }, new { Id = 11, Effect = "MaxCharisma", SkillId = 4, Tier = 2, Value = 10m }, new { Id = 12, Effect = "MaxCharisma", SkillId = 4, Tier = 3, Value = 20m }, new { Id = 13, Effect = "Luck", SkillId = 5, Tier = 1, Value = 1m }, new { Id = 14, Effect = "Luck", SkillId = 5, Tier = 2, Value = 2m }, new { Id = 15, Effect = "Luck", SkillId = 5, Tier = 3, Value = 3m }, new { Id = 16, Effect = "Agility", SkillId = 6, Tier = 1, Value = 1m }, new { Id = 17, Effect = "Agility", SkillId = 6, Tier = 2, Value = 2m }, new { Id = 18, Effect = "Agility", SkillId = 6, Tier = 3, Value = 3m }, new { Id = 19, Effect = "Perception", SkillId = 7, Tier = 1, Value = 1m }, new { Id = 20, Effect = "Perception", SkillId = 7, Tier = 2, Value = 2m }, new { Id = 21, Effect = "Perception", SkillId = 7, Tier = 3, Value = 3m }); }); modelBuilder.Entity("PetCompanion.Models.EquippedItem", b => { b.HasOne("PetCompanion.Models.GameItem", "GameItem") .WithMany() .HasForeignKey("GameItemId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("PetCompanion.Models.Pet", "Pet") .WithMany("EquippedItemsList") .HasForeignKey("PetId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("GameItem"); b.Navigation("Pet"); }); modelBuilder.Entity("PetCompanion.Models.Inventory", b => { b.HasOne("PetCompanion.Models.Pet", "Pet") .WithOne("Inventory") .HasForeignKey("PetCompanion.Models.Inventory", "PetId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Pet"); }); modelBuilder.Entity("PetCompanion.Models.InventoryItem", b => { b.HasOne("PetCompanion.Models.GameItem", "GameItem") .WithMany() .HasForeignKey("GameItemId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("PetCompanion.Models.Inventory", null) .WithMany("Items") .HasForeignKey("InventoryId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("GameItem"); }); modelBuilder.Entity("PetCompanion.Models.PetSkill", b => { b.HasOne("PetCompanion.Models.Pet", "Pet") .WithMany("Skills") .HasForeignKey("PetId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("PetCompanion.Models.Skill", "Skill") .WithMany("PetSkills") .HasForeignKey("SkillId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Pet"); b.Navigation("Skill"); }); modelBuilder.Entity("PetCompanion.Models.PetStats", b => { b.HasOne("PetCompanion.Models.Pet", null) .WithOne("Stats") .HasForeignKey("PetCompanion.Models.PetStats", "PetId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("PetCompanion.Models.Resources", b => { b.HasOne("PetCompanion.Models.Pet", null) .WithOne("Resources") .HasForeignKey("PetCompanion.Models.Resources", "PetId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("PetCompanion.Models.SkillEffect", b => { b.HasOne("PetCompanion.Models.Skill", "Skill") .WithMany("Effects") .HasForeignKey("SkillId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Skill"); }); modelBuilder.Entity("PetCompanion.Models.Inventory", b => { b.Navigation("Items"); }); modelBuilder.Entity("PetCompanion.Models.Pet", b => { b.Navigation("EquippedItemsList"); b.Navigation("Inventory") .IsRequired(); b.Navigation("Resources") .IsRequired(); b.Navigation("Skills"); b.Navigation("Stats") .IsRequired(); }); modelBuilder.Entity("PetCompanion.Models.Skill", b => { b.Navigation("Effects"); b.Navigation("PetSkills"); }); #pragma warning restore 612, 618 } } }