51 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using Core.Blueprint.Mongo;
 | |
| using MongoDB.Bson.Serialization.Attributes;
 | |
| using System.Text.Json.Serialization;
 | |
| 
 | |
| namespace Core.Adapters.Lib.Inventory
 | |
| {
 | |
|     [CollectionAttributeName("Inventory")]
 | |
|     public class InventoryItem : FurnitureModel
 | |
|     {
 | |
|         [BsonElement("modelId")]
 | |
|         [JsonPropertyName("modelId")]
 | |
|         public string ModelId { get; set; }  // FK a FurnitureModel._id
 | |
| 
 | |
|         [BsonElement("name")]
 | |
|         [JsonPropertyName("name")]
 | |
|         public string Name { get; set; }
 | |
| 
 | |
|         [BsonElement("color")]
 | |
|         [JsonPropertyName("color")]
 | |
|         public string Color { get; set; }
 | |
| 
 | |
|         [BsonElement("line")]
 | |
|         [JsonPropertyName("line")]
 | |
|         public string Line { get; set; }
 | |
| 
 | |
|         [BsonElement("price")]
 | |
|         [JsonPropertyName("price")]
 | |
|         public decimal Price { get; set; }
 | |
| 
 | |
|         [BsonElement("currency")]
 | |
|         [JsonPropertyName("currency")]
 | |
|         public string Currency { get; set; }
 | |
| 
 | |
|         [BsonElement("stock")]
 | |
|         [JsonPropertyName("stock")]
 | |
|         public int Stock { get; set; }
 | |
| 
 | |
|         [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; } = new();
 | |
|     }
 | |
| }
 |