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:
22
Models/ActionGathered.cs
Normal file
22
Models/ActionGathered.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace PetCompanion.Models
|
||||
{
|
||||
public class ActionGathered
|
||||
{
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
[ForeignKey("Pet")]
|
||||
public string PetId { get; set; }
|
||||
public string? Resource { get; set; }
|
||||
[ForeignKey("GameItem")]
|
||||
public int? ItemId { get; set; }
|
||||
public int Amount { get; set; }
|
||||
[JsonIgnore]
|
||||
public virtual Pet Pet { get; set; }
|
||||
public virtual GameItem? GameItem { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user