Add Tag CRUD
This commit is contained in:
		
							
								
								
									
										75
									
								
								Core.Inventory.Provider/Contracts/ITagProvider.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										75
									
								
								Core.Inventory.Provider/Contracts/ITagProvider.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,75 @@ | ||||
| using Core.Adapters.Lib; | ||||
| using Core.Blueprint.Mongo; | ||||
| using Core.Inventory.Domain.Contexts.Inventory.Request; | ||||
|  | ||||
| namespace Core.Inventory.Provider.Contracts | ||||
| { | ||||
|     public interface ITagProvider | ||||
|     { | ||||
|         /// <summary> | ||||
|         /// Creates a new Tag. | ||||
|         /// </summary> | ||||
|         /// <param name="entity">The Tag to be created.</param> | ||||
|         /// <returns>A <see cref="{Task{TagAdapter}}"/> representing | ||||
|         /// the asynchronous execution of the service.</returns> | ||||
|         ValueTask<TagAdapter> CreateTag(TagRequest newTag, CancellationToken cancellationToken); | ||||
|  | ||||
|         /// <summary> | ||||
|         /// Gets an Tag by identifier. | ||||
|         /// </summary> | ||||
|         /// <param name="id">The Tag identifier.</param> | ||||
|         /// <returns>A <see cref="{Task{TagAdapter}}"/> representing | ||||
|         /// the asynchronous execution of the service.</returns> | ||||
|         ValueTask<TagAdapter> GetTagById(string _id, CancellationToken cancellationToken); | ||||
|  | ||||
|         /// <summary> | ||||
|         /// Gets all the Tags. | ||||
|         /// </summary> | ||||
|         /// <returns>A <see cref="{Task{IEnumerbale{TagAdapter}}}"/> representing | ||||
|         /// the asynchronous execution of the service.</returns> | ||||
|         ValueTask<IEnumerable<TagAdapter>> GetAllTags(CancellationToken cancellationToken); | ||||
|  | ||||
|         /// <summary> | ||||
|         /// Gets all the Tags by Tags identifier list. | ||||
|         /// </summary> | ||||
|         /// <param name="Tags">The list of Tags identifiers.</param> | ||||
|         /// <returns>A <see cref="Task{IEnumerable{TagAdapter}}"/> representing | ||||
|         /// the asynchronous execution of the service.</returns> | ||||
|         ValueTask<IEnumerable<TagAdapter>> GetAllTagsByList(string[] Tags, CancellationToken cancellationToken); | ||||
|  | ||||
|         /// <summary> | ||||
|         /// Changes the status of the Tag. | ||||
|         /// </summary> | ||||
|         /// <param name="id">The Tag identifier.</param> | ||||
|         /// <param name="newStatus">The new status of the Tag.</param> | ||||
|         /// <returns>The <see cref="TagAdapter"/> updated entity.</returns> | ||||
|         /// <returns>A <see cref="{Task{TagAdapter}}"/> representing | ||||
|         /// the asynchronous execution of the service.</returns> | ||||
|         ValueTask<TagAdapter> ChangeTagStatus(string id, StatusEnum newStatus, CancellationToken cancellationToken); | ||||
|  | ||||
|         /// <summary> | ||||
|         /// Updates a Tag by id. | ||||
|         /// </summary> | ||||
|         /// <param name="entity">The Tag to be updated.</param> | ||||
|         /// <param name="id">The Tag identifier.</param> | ||||
|         /// <returns>A <see cref="{Task{TagAdapter}}"/> representing | ||||
|         /// the asynchronous execution of the service.</returns> | ||||
|         ValueTask<TagAdapter> UpdateTag(TagAdapter entity, CancellationToken cancellationToken); | ||||
|  | ||||
|         /// <summary> | ||||
|         /// Adds a parentTag to the tag. | ||||
|         /// </summary> | ||||
|         /// <param name="tagId">The identifier of the tag to whom the parentTag will be added.</param> | ||||
|         /// <param name="parentTagId">The identifier of the parentTag to add.</param> | ||||
|         /// <returns>A <see cref="Task{TagAdapter}"/> representing the asynchronous operation, with the updated tag object.</returns> | ||||
|         ValueTask<TagAdapter> AddParentTag(string tagId, string parentTagId, CancellationToken cancellationToken); | ||||
|  | ||||
|         /// <summary> | ||||
|         /// Removes a parentTag from the tag. | ||||
|         /// </summary> | ||||
|         /// <param name="tagId">The identifier of the tag to whom the parentTag will be added.</param> | ||||
|         /// <param name="parentTagId">The identifier of the parentTag to add.</param> | ||||
|         /// <returns>A <see cref="Task{TagAdapter}"/> representing the asynchronous operation, with the updated tag object.</returns> | ||||
|         ValueTask<TagAdapter> RemoveParentTag(string tagId, string parentTagId, CancellationToken cancellationToken); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Oscar Morales
					Oscar Morales