feat: added endpoint DeleteProduct

- feat: Added Product controller and endpoints
- feat: package updated
This commit is contained in:
2025-08-06 18:11:19 -06:00
parent f31ec86352
commit bed3202892
6 changed files with 67 additions and 3 deletions

View File

@@ -131,6 +131,9 @@ namespace Core.Inventory.External.Clients.Inventory
[Delete("/api/v1/Product/RemoveTag")]
Task<ApiResponse<ProductAdapter>> RemoveTagFromProductAsync([Header("TrackingId")][Body] RemoveTagFromProductRequest request, CancellationToken cancellationToken = default);
[Delete("/api/v1/Product/Delete")]
Task<ApiResponse<ProductAdapter>> DeleteProductService([Header("TrackingId")][Body] DeleteProductRequest request, CancellationToken cancellationToken = default);
#endregion
}
}

View File

@@ -5,7 +5,7 @@ namespace Core.Inventory.External.Clients.Inventory.Requests.Product
public string TenantId { get; set; } = null!;
public string ProductName { get; set; } = null!;
public string Description { get; set; } = null!;
public string Status { get; set; } = null!;
public string ProductStatus { get; set; } = null!;
public List<string> TagIds { get; set; } = new List<string>();
}
}

View File

@@ -0,0 +1,14 @@
using Lib.Architecture.BuildingBlocks;
namespace Core.Inventory.External.Clients.Inventory.Requests.Product
{
public class DeleteProductRequest : Notificator, ICommand
{
public string Id { get; set; } = null!;
public bool Validate()
{
return Id != null;
}
}
}

View File

@@ -8,7 +8,7 @@ namespace Core.Inventory.External.Clients.Inventory.Requests.Product
public string TenantId { get; set; } = null!;
public string ProductName { get; set; } = null!;
public string Description { get; set; } = null!;
public string Status { get; set; } = null!;
public string ProductStatus { get; set; } = null!;
public List<string> TagIds { get; set; } = new List<string>();
}
}

View File

@@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Adapters.Lib" Version="1.0.11" />
<PackageReference Include="Adapters.Lib" Version="1.0.13" />
<PackageReference Include="BuildingBlocks.Library" Version="1.0.0" />
<PackageReference Include="Refit" Version="8.0.0" />
</ItemGroup>