re-factor in adapters
This commit is contained in:
		| @@ -1,27 +1,13 @@ | ||||
| using Core.Blueprint.Mongo; | ||||
| using MongoDB.Bson.Serialization.Attributes; | ||||
| using MongoDB.Bson.Serialization.Attributes; | ||||
| using System.Text.Json.Serialization; | ||||
|  | ||||
| namespace Core.Adapters.Lib | ||||
| namespace Core.Adapters.Lib.Inventory | ||||
| { | ||||
|     [CollectionAttributeName("Inventory")] | ||||
|     public class InventoryItem : FurnitureModel | ||||
|     public abstract class InventoryItem : Document | ||||
|     { | ||||
|         [BsonElement("modelId")] | ||||
|         [JsonPropertyName("modelId")] | ||||
|         public string ModelId { get; set; } = null!; // FK to FurnitureModel._id | ||||
|  | ||||
|         [BsonElement("name")] | ||||
|         [JsonPropertyName("name")] | ||||
|         public string Name { get; set; } = null!; | ||||
|  | ||||
|         [BsonElement("color")] | ||||
|         [JsonPropertyName("color")] | ||||
|         public string Color { get; set; } = null!; | ||||
|  | ||||
|         [BsonElement("line")] | ||||
|         [JsonPropertyName("line")] | ||||
|         public string Line { get; set; } = null!; | ||||
|         [BsonElement("stock")] | ||||
|         [JsonPropertyName("stock")] | ||||
|         public int Stock { get; set; } | ||||
|  | ||||
|         [BsonElement("price")] | ||||
|         [JsonPropertyName("price")] | ||||
| @@ -31,10 +17,6 @@ namespace Core.Adapters.Lib | ||||
|         [JsonPropertyName("currency")] | ||||
|         public string Currency { get; set; } = null!; | ||||
|  | ||||
|         [BsonElement("stock")] | ||||
|         [JsonPropertyName("stock")] | ||||
|         public int Stock { get; set; } | ||||
|  | ||||
|         [BsonElement("categoryId")] | ||||
|         [JsonPropertyName("categoryId")] | ||||
|         public Guid CategoryId { get; set; } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user