Add TagType CRUD

This commit is contained in:
Oscar Morales
2025-07-31 19:08:07 -06:00
parent 977aa577cc
commit 93d15861a1
9 changed files with 281 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
using Core.Adapters.Lib;
using Core.Inventory.External.Clients.Inventory.Requests.Base;
using Core.Inventory.External.Clients.Inventory.Requests.TagType;
using Core.Inventory.External.Clients.Inventory.Requests.Variant;
using Refit;
@@ -50,5 +51,27 @@ namespace Core.Inventory.External.Clients.Inventory
Task<ApiResponse<IEnumerable<FurnitureVariant>>> GetAllVariantsAsync([Header("TrackingId")] string trackingId, CancellationToken cancellationToken = default);
#endregion
#region TagType
[Post("/api/v1/TagType/Create")]
Task<ApiResponse<TagTypeAdapter>> CreateTagTypeService([Header("TrackingId")][Body] CreateTagTypeRequest request, CancellationToken cancellationToken = default);
[Post("/api/v1/TagType/GetById")]
Task<ApiResponse<TagTypeAdapter>> GetTagTypeByIdService([Header("TrackingId")][Body] GetTagTypeRequest request, CancellationToken cancellationToken = default);
[Get("/api/v1/TagType/GetAll")]
Task<ApiResponse<IEnumerable<TagTypeAdapter>>> GetAllTagTypesService([Header("TrackingId")][Body] GetAllTagTypesRequest request, CancellationToken cancellationToken = default);
[Post("/api/v1/TagType/GetTagTypeList")]
Task<ApiResponse<IEnumerable<TagTypeAdapter>>> GetAllTagTypesByListService([Header("TrackingId")][Body] GetAllTagTypesByListRequest request, CancellationToken cancellationToken = default);
[Put("/api/v1/TagType/Update")]
Task<ApiResponse<TagTypeAdapter>> UpdateTagTypeService([Header("TrackingId")][Body] UpdateTagTypeRequest request, CancellationToken cancellationToken = default);
[Patch("/api/v1/TagType/ChangeStatus")]
Task<ApiResponse<TagTypeAdapter>> ChangeTagTypeStatusService([Header("TrackingId")][Body] ChangeTagTypeStatusRequest request, CancellationToken cancellationToken = default);
#endregion
}
}

View File

@@ -0,0 +1,10 @@
using Core.Blueprint.Mongo;
namespace Core.Inventory.External.Clients.Inventory.Requests.TagType
{
public class ChangeTagTypeStatusRequest
{
public string Id { get; set; }
public StatusEnum Status { get; set; }
}
}

View File

@@ -0,0 +1,10 @@
namespace Core.Inventory.External.Clients.Inventory.Requests.TagType
{
public class CreateTagTypeRequest
{
public string TenantId { get; set; } = null!;
public string TypeName { get; set; } = null!;
public int Level { get; set; }
public string ParentTypeId { get; set; } = null!;
}
}

View File

@@ -0,0 +1,7 @@
namespace Core.Inventory.External.Clients.Inventory.Requests.TagType
{
public class GetAllTagTypesByListRequest
{
public string[] TagTypes { get; set; }
}
}

View File

@@ -0,0 +1,6 @@
namespace Core.Inventory.External.Clients.Inventory.Requests.TagType
{
public class GetAllTagTypesRequest
{
}
}

View File

@@ -0,0 +1,7 @@
namespace Core.Inventory.External.Clients.Inventory.Requests.TagType
{
public class GetTagTypeRequest
{
public string Id { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
using Core.Blueprint.Mongo;
namespace Core.Inventory.External.Clients.Inventory.Requests.TagType
{
public class UpdateTagTypeRequest
{
public string Id { get; set; } = null!;
public string TenantId { get; set; } = null!;
public string TypeName { get; set; } = null!;
public int Level { get; set; }
public string ParentTypeId { get; set; } = null!;
public StatusEnum Status { get; set; }
}
}

View File

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