Files
Core.Adapters.Lib/Inventory/InventoryItem.cs

33 lines
924 B
C#

using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Core.Adapters.Lib
{
public abstract class InventoryItem : Document
{
[BsonElement("stock")]
[JsonPropertyName("stock")]
public int Stock { get; set; }
[BsonElement("price")]
[JsonPropertyName("price")]
public decimal Price { get; set; }
[BsonElement("currency")]
[JsonPropertyName("currency")]
public string Currency { get; set; } = null!;
[BsonElement("categoryId")]
[JsonPropertyName("categoryId")]
public Guid CategoryId { get; set; }
[BsonElement("providerId")]
[JsonPropertyName("providerId")]
public Guid ProviderId { get; set; }
[BsonElement("attributes")]
[JsonPropertyName("attributes")]
public Dictionary<string, object> Attributes { get; set; } = [];
}
}