Add action gathering functionality: implement ActionGathered model and repository, update Pet model and services, and enhance GameItemsRepository with item retrieval methods.
This commit is contained in:
@@ -17,6 +17,34 @@ namespace PetCompanion.Migrations
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "9.0.1");
|
||||
|
||||
modelBuilder.Entity("PetCompanion.Models.ActionGathered", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Amount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("ItemId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("PetId")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Resource")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ItemId");
|
||||
|
||||
b.HasIndex("PetId");
|
||||
|
||||
b.ToTable("ActionGathered");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PetCompanion.Models.EquippedItem", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -665,6 +693,23 @@ namespace PetCompanion.Migrations
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PetCompanion.Models.ActionGathered", b =>
|
||||
{
|
||||
b.HasOne("PetCompanion.Models.GameItem", "GameItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemId");
|
||||
|
||||
b.HasOne("PetCompanion.Models.Pet", "Pet")
|
||||
.WithMany("ActionGathered")
|
||||
.HasForeignKey("PetId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("GameItem");
|
||||
|
||||
b.Navigation("Pet");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PetCompanion.Models.EquippedItem", b =>
|
||||
{
|
||||
b.HasOne("PetCompanion.Models.GameItem", "GameItem")
|
||||
@@ -756,6 +801,8 @@ namespace PetCompanion.Migrations
|
||||
|
||||
modelBuilder.Entity("PetCompanion.Models.Pet", b =>
|
||||
{
|
||||
b.Navigation("ActionGathered");
|
||||
|
||||
b.Navigation("EquippedItemsList");
|
||||
|
||||
b.Navigation("Inventory")
|
||||
|
||||
Reference in New Issue
Block a user