Final fixes for demo
This commit is contained in:
		| @@ -0,0 +1,19 @@ | ||||
| using Core.Adapters.Lib; | ||||
|  | ||||
| namespace Core.Inventory.External.Clients.Adapters | ||||
| { | ||||
|     public class FurnitureBaseAdapter | ||||
|     { | ||||
|         public string _Id { get; set; } = null!; | ||||
|         public string Id { get; init; } = null!; | ||||
|         public string ModelName { get; set; } = null!; | ||||
|         public string Material { get; set; } = null!; | ||||
|         public string Condition { get; set; } = null!; | ||||
|         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; } | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,21 @@ | ||||
| namespace Core.Inventory.External.Clients.Adapters | ||||
| { | ||||
|     public class FurnitureVariantAdapter | ||||
|     { | ||||
|         public string _Id { get; set; } = null!; | ||||
|         public string Id { get; init; } = null!; | ||||
|         public string ModelId { get; set; } = null!; | ||||
|         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; } = []; | ||||
|     } | ||||
| } | ||||
| @@ -1,5 +1,6 @@ | ||||
| using Core.Adapters.Lib; | ||||
| using Core.Blueprint.Mongo; | ||||
| using Core.Inventory.External.Clients.Adapters; | ||||
| using Core.Inventory.External.Clients.Requests; | ||||
| using Microsoft.AspNetCore.Mvc; | ||||
| using Refit; | ||||
| @@ -20,7 +21,7 @@ namespace Core.Inventory.External.Clients | ||||
|         Task<FurnitureBase> CreateFurnitureBaseAsync([FromBody] FurnitureBaseRequest request, CancellationToken cancellationToken = default); | ||||
|  | ||||
|         [Put("/api/v1/FurnitureBase/{id}")] | ||||
|         Task<FurnitureBase> UpdateFurnitureBaseAsync([FromBody] FurnitureBaseRequest request, [FromRoute] string id, CancellationToken cancellationToken = default); | ||||
|         Task<FurnitureBase> UpdateFurnitureBaseAsync([FromRoute] string id, [FromBody] FurnitureBaseAdapter request, CancellationToken cancellationToken = default); | ||||
|  | ||||
|         [Patch("/api/v1/FurnitureBase/{mongoId}/{newStatus}/ChangeStatus")] | ||||
|         Task<FurnitureBase> ChangeFurnitureBaseStatusAsync([FromRoute] string mongoId, [FromRoute] StatusEnum newStatus, CancellationToken cancellationToken = default); | ||||
| @@ -42,7 +43,7 @@ namespace Core.Inventory.External.Clients | ||||
|         Task<FurnitureVariant> CreateFurnitureVariantAsync([FromBody] FurnitureVariantRequest request, CancellationToken cancellationToken = default); | ||||
|  | ||||
|         [Put("/api/v1/FurnitureVariant/{id}")] | ||||
|         Task<FurnitureVariant> UpdateFurnitureVariantAsync([FromBody] FurnitureVariantRequest request, [FromRoute] string id, CancellationToken cancellationToken = default); | ||||
|         Task<FurnitureVariant> UpdateFurnitureVariantAsync([FromRoute] string id, [FromBody] FurnitureVariantAdapter request, CancellationToken cancellationToken = default); | ||||
|  | ||||
|         [Patch("/api/v1/FurnitureVariant/{mongoId}/{newStatus}/ChangeStatus")] | ||||
|         Task<FurnitureVariant> ChangeFurnitureVariantStatusAsync([FromRoute] string mongoId, [FromRoute] StatusEnum newStatus, CancellationToken cancellationToken = default); | ||||
|   | ||||
| @@ -11,9 +11,9 @@ | ||||
|         public string Currency { get; set; } = "USD"; | ||||
|         public int Stock { get; set; } | ||||
|  | ||||
|         public Guid CategoryId { get; set; } | ||||
|         public Guid ProviderId { get; set; } | ||||
|         public string CategoryId { get; set; } = string.Empty!; | ||||
|         public string ProviderId { get; set; } = string.Empty!; | ||||
|  | ||||
|         public Dictionary<string, object> Attributes { get; set; } = []; | ||||
|         public Dictionary<string, string> Attributes { get; set; } = []; | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user