Add skill management system: implement Skill and PetSkill models, create SkillController, and update ApplicationDbContext for skills

This commit is contained in:
2025-02-02 15:30:48 -03:00
parent 06455db598
commit f234b5d84d
17 changed files with 543 additions and 749 deletions

View File

@@ -1,28 +0,0 @@
namespace PetCompanion.Models
{
public class Inventory
{
public List<Item> Items { get; set; } = new();
public int Capacity { get; set; }
public bool AddItem(Item item)
{
if (Items.Count < Capacity)
{
Items.Add(item);
return true;
}
return false;
}
public bool RemoveItem(Item item)
{
return Items.Remove(item);
}
public void TrashItem(Item item)
{
RemoveItem(item);
}
}
}