Add Icon property to FurnitureBase and FurnitureVariant
This commit is contained in:
		| @@ -19,10 +19,10 @@ namespace Core.Inventory.Application.UseCases.Inventory.Input.Base | ||||
|         public string? BaseDescription { get; set; } | ||||
|         public string? Representation { get; set; } | ||||
|         public string? MaintenanceNotes { get; set; } | ||||
|  | ||||
|         public Dimensions Dimensions { get; set; } = new(); | ||||
|  | ||||
|         public List<string>? VariantIds { get; set; } | ||||
|         public string Icon { get; set; } = null!; | ||||
|  | ||||
|         public bool Validate() | ||||
|         { | ||||
|             return !string.IsNullOrWhiteSpace(ModelName) && | ||||
|   | ||||
| @@ -21,10 +21,10 @@ namespace Core.Inventory.Application.UseCases.Inventory.Input.Base | ||||
|         public string? BaseDescription { get; set; } | ||||
|         public string? Representation { get; set; } | ||||
|         public string? MaintenanceNotes { get; set; } | ||||
|  | ||||
|         public Dimensions Dimensions { get; set; } = new(); | ||||
|  | ||||
|         public List<string>? VariantIds { get; set; } | ||||
|         public string Icon { get; set; } = null!; | ||||
|  | ||||
|         public bool Validate() | ||||
|         { | ||||
|             return !string.IsNullOrWhiteSpace(_Id) | ||||
|   | ||||
| @@ -13,15 +13,13 @@ namespace Core.Inventory.Application.UseCases.Inventory.Input.Variant | ||||
|         public string Name { get; set; } = null!; | ||||
|         public string Color { get; set; } = null!; | ||||
|         public string? Line { get; set; } | ||||
|  | ||||
|         public decimal Price { get; set; } | ||||
|         public string Currency { get; set; } = "USD"; | ||||
|         public int Stock { get; set; } | ||||
|  | ||||
|         public string CategoryId { get; set; } = string.Empty; | ||||
|         public string ProviderId { get; set; } = string.Empty; | ||||
|  | ||||
|         public Dictionary<string, string> Attributes { get; set; } = []; | ||||
|         public string Icon { get; set; } = null!; | ||||
|  | ||||
|         public bool Validate() | ||||
|         { | ||||
|   | ||||
| @@ -23,11 +23,10 @@ namespace Core.Inventory.Application.UseCases.Inventory.Input.Variant | ||||
|         public int Stock { get; set; } | ||||
|         public decimal Price { get; set; } | ||||
|         public string Currency { get; set; } = "USD"; | ||||
|  | ||||
|         public string CategoryId { get; set; } = string.Empty!; | ||||
|         public string ProviderId { get; set; } = string.Empty!; | ||||
|  | ||||
|         public Dictionary<string, string> Attributes { get; set; } = []; | ||||
|         public string Icon { get; set; } = null!; | ||||
|  | ||||
|         public bool Validate() | ||||
|         { | ||||
|   | ||||
| @@ -94,7 +94,8 @@ namespace Core.Inventory.Application.UseCases.Inventory | ||||
|                         Depth = command.Dimensions.Depth, | ||||
|                         Height = command.Dimensions.Height, | ||||
|                         Width = command.Dimensions.Width | ||||
|                     } | ||||
|                     }, | ||||
|                     Icon = command.Icon | ||||
|                 }; | ||||
|  | ||||
|                 var result = await _inventoryDALService.CreateFurnitureBaseAsync(request, cancellationToken); | ||||
| @@ -133,7 +134,8 @@ namespace Core.Inventory.Application.UseCases.Inventory | ||||
|                         Depth = command.Dimensions.Depth, | ||||
|                         Height = command.Dimensions.Height, | ||||
|                         Width = command.Dimensions.Width | ||||
|                     } | ||||
|                     }, | ||||
|                     Icon = command.Icon | ||||
|                 }; | ||||
|  | ||||
|                 var result = await _inventoryDALService.UpdateFurnitureBaseAsync(command.Id, request, cancellationToken); | ||||
| @@ -226,7 +228,8 @@ namespace Core.Inventory.Application.UseCases.Inventory | ||||
|                     ModelId = command.ModelId, | ||||
|                     Name = command.Name, | ||||
|                     Price = command.Price, | ||||
|                     ProviderId  = command.ProviderId | ||||
|                     ProviderId  = command.ProviderId, | ||||
|                     Icon = command.Icon | ||||
|                 }; | ||||
|                 var result = await _inventoryDALService.CreateFurnitureVariantAsync(request, cancellationToken); | ||||
|                 _variantPort.Success(result); | ||||
| @@ -260,7 +263,8 @@ namespace Core.Inventory.Application.UseCases.Inventory | ||||
|                     ModelId = command.ModelId, | ||||
|                     Name = command.Name, | ||||
|                     Price = command.Price, | ||||
|                     ProviderId = command.ProviderId | ||||
|                     ProviderId = command.ProviderId, | ||||
|                     Icon = command.Icon | ||||
|                 }; | ||||
|                 var result = await _inventoryDALService.UpdateFurnitureVariantAsync(command.Id, request, cancellationToken); | ||||
|                 _variantPort.Success(result); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Oscar Morales
					Oscar Morales