Files
promiscuity/microservices/InventoryApi/Models/InventoryItemResponse.cs
T
2026-03-15 10:21:49 -05:00

33 lines
817 B
C#

namespace InventoryApi.Models;
public class InventoryItemResponse
{
public string Id { get; set; } = string.Empty;
public string ItemKey { get; set; } = string.Empty;
public int Quantity { get; set; }
public string OwnerType { get; set; } = string.Empty;
public string OwnerId { get; set; } = string.Empty;
public int? Slot { get; set; }
public string? EquippedSlot { get; set; }
public DateTime UpdatedUtc { get; set; }
public static InventoryItemResponse FromModel(InventoryItem item) => new()
{
Id = item.Id,
ItemKey = item.ItemKey,
Quantity = item.Quantity,
OwnerType = item.OwnerType,
OwnerId = item.OwnerId,
Slot = item.Slot,
EquippedSlot = item.EquippedSlot,
UpdatedUtc = item.UpdatedUtc
};
}