using MongoDB.Bson.Serialization.Attributes; namespace InventoryApi.Models; public class InventoryItem { [BsonId] public string Id { get; set; } = Guid.NewGuid().ToString(); [BsonElement("itemKey")] public string ItemKey { get; set; } = string.Empty; [BsonElement("quantity")] public int Quantity { get; set; } = 1; [BsonElement("ownerType")] public string OwnerType { get; set; } = string.Empty; [BsonElement("ownerId")] public string OwnerId { get; set; } = string.Empty; [BsonElement("ownerUserId")] public string? OwnerUserId { get; set; } [BsonElement("slot")] [BsonIgnoreIfNull] public int? Slot { get; set; } [BsonElement("equippedSlot")] [BsonIgnoreIfNull] public string? EquippedSlot { get; set; } [BsonElement("createdUtc")] public DateTime CreatedUtc { get; set; } = DateTime.UtcNow; [BsonElement("updatedUtc")] public DateTime UpdatedUtc { get; set; } = DateTime.UtcNow; }