first version of inventory adapters
This commit is contained in:
		
							
								
								
									
										51
									
								
								Inventory/InventoryItem.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								Inventory/InventoryItem.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,51 @@ | ||||
| using Core.Adapters.Lib.Inventory.Common; | ||||
| 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(); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user