using MongoDB.Bson; 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")] [BsonRepresentation(BsonType.String)] [JsonPropertyName("categoryId")] public Guid CategoryId { get; set; } [BsonElement("providerId")] [BsonRepresentation(BsonType.String)] [JsonPropertyName("providerId")] public Guid ProviderId { get; set; } [BsonElement("attributes")] [JsonPropertyName("attributes")] public Dictionary Attributes { get; set; } = []; } }