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? BaseDescription { get; set; } | ||||||
|         public string? Representation { get; set; } |         public string? Representation { get; set; } | ||||||
|         public string? MaintenanceNotes { get; set; } |         public string? MaintenanceNotes { get; set; } | ||||||
|  |  | ||||||
|         public Dimensions Dimensions { get; set; } = new(); |         public Dimensions Dimensions { get; set; } = new(); | ||||||
|  |  | ||||||
|         public List<string>? VariantIds { get; set; } |         public List<string>? VariantIds { get; set; } | ||||||
|  |         public string Icon { get; set; } = null!; | ||||||
|  |  | ||||||
|         public bool Validate() |         public bool Validate() | ||||||
|         { |         { | ||||||
|             return !string.IsNullOrWhiteSpace(ModelName) && |             return !string.IsNullOrWhiteSpace(ModelName) && | ||||||
|   | |||||||
| @@ -21,10 +21,10 @@ namespace Core.Inventory.Application.UseCases.Inventory.Input.Base | |||||||
|         public string? BaseDescription { get; set; } |         public string? BaseDescription { get; set; } | ||||||
|         public string? Representation { get; set; } |         public string? Representation { get; set; } | ||||||
|         public string? MaintenanceNotes { get; set; } |         public string? MaintenanceNotes { get; set; } | ||||||
|  |  | ||||||
|         public Dimensions Dimensions { get; set; } = new(); |         public Dimensions Dimensions { get; set; } = new(); | ||||||
|  |  | ||||||
|         public List<string>? VariantIds { get; set; } |         public List<string>? VariantIds { get; set; } | ||||||
|  |         public string Icon { get; set; } = null!; | ||||||
|  |  | ||||||
|         public bool Validate() |         public bool Validate() | ||||||
|         { |         { | ||||||
|             return !string.IsNullOrWhiteSpace(_Id) |             return !string.IsNullOrWhiteSpace(_Id) | ||||||
|   | |||||||
| @@ -13,15 +13,13 @@ namespace Core.Inventory.Application.UseCases.Inventory.Input.Variant | |||||||
|         public string Name { get; set; } = null!; |         public string Name { get; set; } = null!; | ||||||
|         public string Color { get; set; } = null!; |         public string Color { get; set; } = null!; | ||||||
|         public string? Line { get; set; } |         public string? Line { get; set; } | ||||||
|  |  | ||||||
|         public decimal Price { get; set; } |         public decimal Price { get; set; } | ||||||
|         public string Currency { get; set; } = "USD"; |         public string Currency { get; set; } = "USD"; | ||||||
|         public int Stock { get; set; } |         public int Stock { get; set; } | ||||||
|  |  | ||||||
|         public string CategoryId { get; set; } = string.Empty; |         public string CategoryId { get; set; } = string.Empty; | ||||||
|         public string ProviderId { get; set; } = string.Empty; |         public string ProviderId { get; set; } = string.Empty; | ||||||
|  |  | ||||||
|         public Dictionary<string, string> Attributes { get; set; } = []; |         public Dictionary<string, string> Attributes { get; set; } = []; | ||||||
|  |         public string Icon { get; set; } = null!; | ||||||
|  |  | ||||||
|         public bool Validate() |         public bool Validate() | ||||||
|         { |         { | ||||||
|   | |||||||
| @@ -23,11 +23,10 @@ namespace Core.Inventory.Application.UseCases.Inventory.Input.Variant | |||||||
|         public int Stock { get; set; } |         public int Stock { get; set; } | ||||||
|         public decimal Price { get; set; } |         public decimal Price { get; set; } | ||||||
|         public string Currency { get; set; } = "USD"; |         public string Currency { get; set; } = "USD"; | ||||||
|  |  | ||||||
|         public string CategoryId { get; set; } = string.Empty!; |         public string CategoryId { get; set; } = string.Empty!; | ||||||
|         public string ProviderId { get; set; } = string.Empty!; |         public string ProviderId { get; set; } = string.Empty!; | ||||||
|  |  | ||||||
|         public Dictionary<string, string> Attributes { get; set; } = []; |         public Dictionary<string, string> Attributes { get; set; } = []; | ||||||
|  |         public string Icon { get; set; } = null!; | ||||||
|  |  | ||||||
|         public bool Validate() |         public bool Validate() | ||||||
|         { |         { | ||||||
|   | |||||||
| @@ -94,7 +94,8 @@ namespace Core.Inventory.Application.UseCases.Inventory | |||||||
|                         Depth = command.Dimensions.Depth, |                         Depth = command.Dimensions.Depth, | ||||||
|                         Height = command.Dimensions.Height, |                         Height = command.Dimensions.Height, | ||||||
|                         Width = command.Dimensions.Width |                         Width = command.Dimensions.Width | ||||||
|                     } |                     }, | ||||||
|  |                     Icon = command.Icon | ||||||
|                 }; |                 }; | ||||||
|  |  | ||||||
|                 var result = await _inventoryDALService.CreateFurnitureBaseAsync(request, cancellationToken); |                 var result = await _inventoryDALService.CreateFurnitureBaseAsync(request, cancellationToken); | ||||||
| @@ -133,7 +134,8 @@ namespace Core.Inventory.Application.UseCases.Inventory | |||||||
|                         Depth = command.Dimensions.Depth, |                         Depth = command.Dimensions.Depth, | ||||||
|                         Height = command.Dimensions.Height, |                         Height = command.Dimensions.Height, | ||||||
|                         Width = command.Dimensions.Width |                         Width = command.Dimensions.Width | ||||||
|                     } |                     }, | ||||||
|  |                     Icon = command.Icon | ||||||
|                 }; |                 }; | ||||||
|  |  | ||||||
|                 var result = await _inventoryDALService.UpdateFurnitureBaseAsync(command.Id, request, cancellationToken); |                 var result = await _inventoryDALService.UpdateFurnitureBaseAsync(command.Id, request, cancellationToken); | ||||||
| @@ -226,7 +228,8 @@ namespace Core.Inventory.Application.UseCases.Inventory | |||||||
|                     ModelId = command.ModelId, |                     ModelId = command.ModelId, | ||||||
|                     Name = command.Name, |                     Name = command.Name, | ||||||
|                     Price = command.Price, |                     Price = command.Price, | ||||||
|                     ProviderId  = command.ProviderId |                     ProviderId  = command.ProviderId, | ||||||
|  |                     Icon = command.Icon | ||||||
|                 }; |                 }; | ||||||
|                 var result = await _inventoryDALService.CreateFurnitureVariantAsync(request, cancellationToken); |                 var result = await _inventoryDALService.CreateFurnitureVariantAsync(request, cancellationToken); | ||||||
|                 _variantPort.Success(result); |                 _variantPort.Success(result); | ||||||
| @@ -260,7 +263,8 @@ namespace Core.Inventory.Application.UseCases.Inventory | |||||||
|                     ModelId = command.ModelId, |                     ModelId = command.ModelId, | ||||||
|                     Name = command.Name, |                     Name = command.Name, | ||||||
|                     Price = command.Price, |                     Price = command.Price, | ||||||
|                     ProviderId = command.ProviderId |                     ProviderId = command.ProviderId, | ||||||
|  |                     Icon = command.Icon | ||||||
|                 }; |                 }; | ||||||
|                 var result = await _inventoryDALService.UpdateFurnitureVariantAsync(command.Id, request, cancellationToken); |                 var result = await _inventoryDALService.UpdateFurnitureVariantAsync(command.Id, request, cancellationToken); | ||||||
|                 _variantPort.Success(result); |                 _variantPort.Success(result); | ||||||
|   | |||||||
| @@ -15,5 +15,6 @@ namespace Core.Inventory.External.Clients.Adapters | |||||||
|  |  | ||||||
|         public Dimensions Dimensions { get; set; } = new(); |         public Dimensions Dimensions { get; set; } = new(); | ||||||
|         public List<string>? VariantIds { get; set; } |         public List<string>? VariantIds { get; set; } | ||||||
|  |         public string Icon { get; set; } = null!; | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -17,5 +17,6 @@ | |||||||
|         public string ProviderId { get; set; } = string.Empty!; |         public string ProviderId { get; set; } = string.Empty!; | ||||||
|  |  | ||||||
|         public Dictionary<string, string> Attributes { get; set; } = []; |         public Dictionary<string, string> Attributes { get; set; } = []; | ||||||
|  |         public string Icon { get; set; } = null!; | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -10,8 +10,8 @@ namespace Core.Inventory.External.Clients.Requests | |||||||
|         public string? BaseDescription { get; set; } |         public string? BaseDescription { get; set; } | ||||||
|         public string? Representation { get; set; } |         public string? Representation { get; set; } | ||||||
|         public string? MaintenanceNotes { get; set; } |         public string? MaintenanceNotes { get; set; } | ||||||
|  |  | ||||||
|         public Dimensions Dimensions { get; set; } = new(); |         public Dimensions Dimensions { get; set; } = new(); | ||||||
|         public List<string>? VariantIds { get; set; } |         public List<string>? VariantIds { get; set; } | ||||||
|  |         public string Icon { get; set; } = null!; | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -15,5 +15,7 @@ | |||||||
|         public string ProviderId { get; set; } = string.Empty!; |         public string ProviderId { get; set; } = string.Empty!; | ||||||
|  |  | ||||||
|         public Dictionary<string, string> Attributes { get; set; } = []; |         public Dictionary<string, string> Attributes { get; set; } = []; | ||||||
|  |  | ||||||
|  |         public string Icon { get; set; } = null!; | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
|  |  | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|     <PackageReference Include="Core.Adapters.Lib" Version="1.0.0" /> |     <PackageReference Include="Core.Adapters.Lib" Version="1.0.1" /> | ||||||
|     <PackageReference Include="Lib.Architecture.BuildingBlocks" Version="1.0.0" /> |     <PackageReference Include="Lib.Architecture.BuildingBlocks" Version="1.0.0" /> | ||||||
|     <PackageReference Include="Refit" Version="8.0.0" /> |     <PackageReference Include="Refit" Version="8.0.0" /> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Oscar Morales
					Oscar Morales