Add Tag CRUD
This commit is contained in:
		| @@ -1,5 +1,6 @@ | ||||
| using Core.Adapters.Lib; | ||||
| using Core.Inventory.External.Clients.Inventory.Requests.Base; | ||||
| using Core.Inventory.External.Clients.Inventory.Requests.Tag; | ||||
| using Core.Inventory.External.Clients.Inventory.Requests.TagType; | ||||
| using Core.Inventory.External.Clients.Inventory.Requests.Variant; | ||||
| using Refit; | ||||
| @@ -73,5 +74,33 @@ namespace Core.Inventory.External.Clients.Inventory | ||||
|         Task<ApiResponse<TagTypeAdapter>> ChangeTagTypeStatusService([Header("TrackingId")][Body] ChangeTagTypeStatusRequest request, CancellationToken cancellationToken = default); | ||||
|  | ||||
|         #endregion | ||||
|  | ||||
|         #region Tag | ||||
|  | ||||
|         [Post("/api/v1/Tag/Create")] | ||||
|         Task<ApiResponse<TagAdapter>> CreateTagService([Header("TrackingId")][Body] CreateTagRequest request, CancellationToken cancellationToken = default); | ||||
|  | ||||
|         [Post("/api/v1/Tag/GetById")] | ||||
|         Task<ApiResponse<TagAdapter>> GetTagByIdService([Header("TrackingId")][Body] GetTagRequest request, CancellationToken cancellationToken = default); | ||||
|  | ||||
|         [Get("/api/v1/Tag/GetAll")] | ||||
|         Task<ApiResponse<IEnumerable<TagAdapter>>> GetAllTagsService([Header("TrackingId")][Body] GetAllTagsRequest request, CancellationToken cancellationToken = default); | ||||
|  | ||||
|         [Post("/api/v1/Tag/GetTagList")] | ||||
|         Task<ApiResponse<IEnumerable<TagAdapter>>> GetAllTagsByListService([Header("TrackingId")][Body] GetAllTagsByListRequest request, CancellationToken cancellationToken = default); | ||||
|  | ||||
|         [Put("/api/v1/Tag/Update")] | ||||
|         Task<ApiResponse<TagAdapter>> UpdateTagService([Header("TrackingId")][Body] UpdateTagRequest request, CancellationToken cancellationToken = default); | ||||
|  | ||||
|         [Patch("/api/v1/Tag/ChangeStatus")] | ||||
|         Task<ApiResponse<TagAdapter>> ChangeTagStatusService([Header("TrackingId")][Body] ChangeTagStatusRequest request, CancellationToken cancellationToken = default); | ||||
|  | ||||
|         [Post("/api/v1/Tag/AddParentTag")] | ||||
|         Task<ApiResponse<TagAdapter>> AddParentTagAsync([Header("TrackingId")][Body] AddParentTagToTagRequest request, CancellationToken cancellationToken = default); | ||||
|  | ||||
|         [Delete("/api/v1/Tag/RemoveParentTag")] | ||||
|         Task<ApiResponse<TagAdapter>> RemoveParentTagAsync([Header("TrackingId")][Body] RemoveParentTagFromTag request, CancellationToken cancellationToken = default); | ||||
|  | ||||
|         #endregion | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -0,0 +1,8 @@ | ||||
| namespace Core.Inventory.External.Clients.Inventory.Requests.Tag | ||||
| { | ||||
|     public class AddParentTagToTagRequest | ||||
|     { | ||||
|         public string TagId { get; set; } | ||||
|         public string ParentTagId { get; set; } | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,10 @@ | ||||
| using Core.Blueprint.Mongo; | ||||
|  | ||||
| namespace Core.Inventory.External.Clients.Inventory.Requests.Tag | ||||
| { | ||||
|     public class ChangeTagStatusRequest | ||||
|     { | ||||
|         public string Id { get; set; } | ||||
|         public StatusEnum Status { get; set; } | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,13 @@ | ||||
| namespace Core.Inventory.External.Clients.Inventory.Requests.Tag | ||||
| { | ||||
|     public class CreateTagRequest | ||||
|     { | ||||
|         public string TenantId { get; set; } = null!; | ||||
|         public string TagName { get; set; } = null!; | ||||
|         public string TypeId { get; set; } = null!; | ||||
|         public string[] ParentTagId { get; set; } = null!; | ||||
|         public string Slug { get; set; } = null!; | ||||
|         public int DisplayOrder { get; set; } | ||||
|         public string Icon { get; set; } = null!; | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,7 @@ | ||||
| namespace Core.Inventory.External.Clients.Inventory.Requests.Tag | ||||
| { | ||||
|     public class GetAllTagsByListRequest | ||||
|     { | ||||
|         public string[] Tags { get; set; } | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,6 @@ | ||||
| namespace Core.Inventory.External.Clients.Inventory.Requests.Tag | ||||
| { | ||||
|     public class GetAllTagsRequest | ||||
|     { | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,7 @@ | ||||
| namespace Core.Inventory.External.Clients.Inventory.Requests.Tag | ||||
| { | ||||
|     public class GetTagRequest | ||||
|     { | ||||
|         public string Id { get; set; } | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,8 @@ | ||||
| namespace Core.Inventory.External.Clients.Inventory.Requests.Tag | ||||
| { | ||||
|     public class RemoveParentTagFromTag | ||||
|     { | ||||
|         public string TagId { get; set; } | ||||
|         public string ParentTagId { get; set; } | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,17 @@ | ||||
| using Core.Blueprint.Mongo; | ||||
|  | ||||
| namespace Core.Inventory.External.Clients.Inventory.Requests.Tag | ||||
| { | ||||
|     public class UpdateTagRequest | ||||
|     { | ||||
|         public string Id { get; set; } = null!; | ||||
|         public string TenantId { get; set; } = null!; | ||||
|         public string TagName { get; set; } = null!; | ||||
|         public string TypeId { get; set; } = null!; | ||||
|         public string[] ParentTagId { get; set; } = null!; | ||||
|         public string Slug { get; set; } = null!; | ||||
|         public int DisplayOrder { get; set; } | ||||
|         public string Icon { get; set; } = null!; | ||||
|         public StatusEnum Status { get; set; } | ||||
|     } | ||||
| } | ||||
| @@ -7,7 +7,7 @@ | ||||
|   </PropertyGroup> | ||||
|  | ||||
|   <ItemGroup> | ||||
|     <PackageReference Include="Adapters.Lib" Version="1.0.9" /> | ||||
|     <PackageReference Include="Adapters.Lib" Version="1.0.10" /> | ||||
|     <PackageReference Include="BuildingBlocks.Library" Version="1.0.0" /> | ||||
|     <PackageReference Include="Refit" Version="8.0.0" /> | ||||
|   </ItemGroup> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Oscar Morales
					Oscar Morales