Add Tag CRUD
This commit is contained in:
		| @@ -73,5 +73,33 @@ namespace Core.Inventory.External.Clients | ||||
|         Task<TagTypeAdapter> ChangeStatusTagTypeAsync([FromRoute] string id, [FromRoute] StatusEnum newStatus, CancellationToken cancellationToken = default); | ||||
|  | ||||
|         #endregion | ||||
|  | ||||
|         #region Tag | ||||
|  | ||||
|         [Get("/api/v1/Tag")] | ||||
|         Task<IEnumerable<TagAdapter>> GetAllTagsAsync(CancellationToken cancellationToken = default); | ||||
|  | ||||
|         [Post("/api/v1/Tag/GetTagList")] | ||||
|         Task<IEnumerable<TagAdapter>> GetAllTagsByListAsync([FromBody] string[] request, CancellationToken cancellationToken = default); | ||||
|  | ||||
|         [Get("/api/v1/Tag/{id}")] | ||||
|         Task<TagAdapter> GetTagByIdAsync([FromRoute] string id, CancellationToken cancellationToken = default); | ||||
|  | ||||
|         [Post("/api/v1/Tag")] | ||||
|         Task<TagAdapter> CreateTagAsync([FromBody] TagRequest newTag, CancellationToken cancellationToken = default); | ||||
|  | ||||
|         [Put("/api/v1/Tag/{id}")] | ||||
|         Task<TagAdapter> UpdateTagAsync([FromBody] TagAdapter entity, [FromRoute] string id, CancellationToken cancellationToken = default); | ||||
|  | ||||
|         [Patch("/api/v1/Tag/{id}/{newStatus}/ChangeStatus")] | ||||
|         Task<TagAdapter> ChangeStatusTagAsync([FromRoute] string id, [FromRoute] StatusEnum newStatus, CancellationToken cancellationToken = default); | ||||
|  | ||||
|         [Post("/api/v1/Tag/{tagId}/ParentTags/{parentTagId}/Add")] | ||||
|         Task<TagAdapter> AddParentTagAsync([FromRoute] string tagId, [FromRoute] string parentTagId, CancellationToken cancellationToken = default); | ||||
|  | ||||
|         [Delete("/api/v1/Tag/{tagId}/ParentTags/{parentTagId}/Remove")] | ||||
|         Task<TagAdapter> RemoveParentTagAsync([FromRoute] string tagId, [FromRoute] string parentTagId, CancellationToken cancellationToken = default); | ||||
|  | ||||
|         #endregion | ||||
|     } | ||||
| } | ||||
|   | ||||
							
								
								
									
										13
									
								
								Core.Inventory.External/Clients/Requests/TagRequest.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								Core.Inventory.External/Clients/Requests/TagRequest.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| namespace Core.Inventory.External.Clients.Requests | ||||
| { | ||||
|     public class TagRequest | ||||
|     { | ||||
|         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!; | ||||
|     } | ||||
| } | ||||
| @@ -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