inventory working :D

This commit is contained in:
2025-02-05 19:38:25 -03:00
parent 7a2c3d2f67
commit 5289910270
15 changed files with 174 additions and 468 deletions

View File

@@ -85,34 +85,13 @@ namespace PetCompanion.Migrations
b.Property<int>("Capacity")
.HasColumnType("INTEGER");
b.HasKey("PetId");
b.ToTable("Inventories");
});
modelBuilder.Entity("PetCompanion.Models.InventoryItem", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("GameItemId")
.HasColumnType("INTEGER");
b.Property<string>("InventoryId")
b.PrimitiveCollection<string>("Items")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("Quantity")
.HasColumnType("INTEGER");
b.HasKey("PetId");
b.HasKey("Id");
b.HasIndex("GameItemId");
b.HasIndex("InventoryId");
b.ToTable("InventoryItems");
b.ToTable("Inventories");
});
modelBuilder.Entity("PetCompanion.Models.Pet", b =>
@@ -576,23 +555,6 @@ namespace PetCompanion.Migrations
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")
@@ -641,11 +603,6 @@ namespace PetCompanion.Migrations
b.Navigation("Skill");
});
modelBuilder.Entity("PetCompanion.Models.Inventory", b =>
{
b.Navigation("Items");
});
modelBuilder.Entity("PetCompanion.Models.Pet", b =>
{
b.Navigation("EquippedItemsList");