using System.ComponentModel.DataAnnotations; namespace DorkNet.Server.Data.Entities; /// /// One row per (player, item) pair. Backs both the /// /api/equipment/v2/getUnlocked and /// /api/consumables/v1/getUnlocked endpoints — the type comes /// from the joined . /// /// For equipment, is always 1 and /// tracks whether it's equipped. For /// consumables, is the stack size and /// tracks whether the player has it favourited / /// quick-equipped on the watch. /// public class PlayerInventoryEntity { public long Id { get; set; } public long PlayerId { get; set; } /// FK by string to . /// Stored as a string rather than an int FK because a player can /// be granted items that aren't in the live store (admin-gifted, /// legacy retired items, etc.). [MaxLength(64)] public string ItemSlug { get; set; } = string.Empty; public int Quantity { get; set; } = 1; public bool IsActive { get; set; } = false; public DateTime AcquiredAt { get; set; } = DateTime.UtcNow; }