Compare commits
	
		
			12 Commits
		
	
	
		
			main
			...
			a266aa5001
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | a266aa5001 | ||
| 4358891b24 | |||
| feee4ebdfa | |||
| 6c11246733 | |||
| 20776516fd | |||
| 08cca3a9c0 | |||
| fcfb3e47e8 | |||
| ad7b1bd983 | |||
| f6a80ba2ec | |||
| e7b25ba91a | |||
| e33301f6af | |||
| 18cb238b40 | 
							
								
								
									
										57
									
								
								Inventory/FurnitureBase.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								Inventory/FurnitureBase.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,57 @@ | |||||||
|  | using Core.Blueprint.Mongo; | ||||||
|  | using MongoDB.Bson.Serialization.Attributes; | ||||||
|  | using System.Text.Json.Serialization; | ||||||
|  |  | ||||||
|  | namespace Core.Adapters.Lib | ||||||
|  | { | ||||||
|  |     [CollectionAttributeName("Furniture")] | ||||||
|  |     public class FurnitureBase : Document | ||||||
|  |     { | ||||||
|  |         [BsonElement("modelName")] | ||||||
|  |         [JsonPropertyName("modelName")] | ||||||
|  |         public string ModelName { get; set; } = null!; | ||||||
|  |  | ||||||
|  |         [BsonElement("material")] | ||||||
|  |         [JsonPropertyName("material")] | ||||||
|  |         public string Material { get; set; } = null!; | ||||||
|  |  | ||||||
|  |         [BsonElement("condition")] | ||||||
|  |         [JsonPropertyName("condition")] | ||||||
|  |         public string Condition { get; set; } = null!; | ||||||
|  |  | ||||||
|  |         [BsonElement("dimensions")] | ||||||
|  |         [JsonPropertyName("dimensions")] | ||||||
|  |         public Dimensions Dimensions { get; set; } = null!; | ||||||
|  |  | ||||||
|  |         [BsonElement("baseDescription")] | ||||||
|  |         [JsonPropertyName("baseDescription")] | ||||||
|  |         public string BaseDescription { get; set; } = null!; | ||||||
|  |  | ||||||
|  |         [BsonElement("representation")] | ||||||
|  |         [JsonPropertyName("representation")] | ||||||
|  |         public string Representation { get; set; } = null!; | ||||||
|  |  | ||||||
|  |         [BsonElement("maintenanceNotes")] | ||||||
|  |         [JsonPropertyName("maintenanceNotes")] | ||||||
|  |         public string MaintenanceNotes { get; set; } = null!; | ||||||
|  |  | ||||||
|  |         [BsonElement("variantIds")] | ||||||
|  |         [JsonPropertyName("variantIds")] | ||||||
|  |         public List<string> VariantIds { get; set; } = new(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     public class Dimensions | ||||||
|  |     { | ||||||
|  |         [BsonElement("width")] | ||||||
|  |         [JsonPropertyName("width")] | ||||||
|  |         public float Width { get; set; } | ||||||
|  |  | ||||||
|  |         [BsonElement("height")] | ||||||
|  |         [JsonPropertyName("height")] | ||||||
|  |         public float Height { get; set; } | ||||||
|  |  | ||||||
|  |         [BsonElement("depth")] | ||||||
|  |         [JsonPropertyName("depth")] | ||||||
|  |         public float Depth { get; set; } | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										26
									
								
								Inventory/FurnitureVariant.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								Inventory/FurnitureVariant.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | |||||||
|  | using Core.Blueprint.Mongo; | ||||||
|  | using MongoDB.Bson.Serialization.Attributes; | ||||||
|  | using System.Text.Json.Serialization; | ||||||
|  |  | ||||||
|  | namespace Core.Adapters.Lib | ||||||
|  | { | ||||||
|  |     [CollectionAttributeName("FurnitureVariants")] | ||||||
|  |     public class FurnitureVariant : InventoryItem | ||||||
|  |     { | ||||||
|  |         [BsonElement("modelId")] | ||||||
|  |         [JsonPropertyName("modelId")] | ||||||
|  |         public string ModelId { get; set; } = null!; | ||||||
|  |  | ||||||
|  |         [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!; | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										35
									
								
								Inventory/InventoryItem.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								Inventory/InventoryItem.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,35 @@ | |||||||
|  | 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 string CategoryId { get; set; } | ||||||
|  |  | ||||||
|  |         [BsonElement("providerId")] | ||||||
|  |         [BsonRepresentation(BsonType.String)] | ||||||
|  |         [JsonPropertyName("providerId")] | ||||||
|  |         public string ProviderId { get; set; } | ||||||
|  |  | ||||||
|  |         [BsonElement("attributes")] | ||||||
|  |         [JsonPropertyName("attributes")] | ||||||
|  |         public Dictionary<string, string> Attributes { get; set; } = []; | ||||||
|  |     } | ||||||
|  | } | ||||||
		Reference in New Issue
	
	Block a user