Add tenant services
This commit is contained in:
		
							
								
								
									
										77
									
								
								Core.Thalos.Provider/Contracts/ITenantProvider.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										77
									
								
								Core.Thalos.Provider/Contracts/ITenantProvider.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,77 @@ | ||||
| // *********************************************************************** | ||||
| // <copyright file="ITenantService.cs"> | ||||
| //     AgileWebs | ||||
| // </copyright> | ||||
| // *********************************************************************** | ||||
|  | ||||
| using Core.Thalos.BuildingBlocks; | ||||
| using Core.Thalos.Domain.Contexts.Onboarding.Request; | ||||
|  | ||||
| namespace Core.Thalos.Provider.Contracts | ||||
| { | ||||
|     /// <summary> | ||||
|     /// Interface for Tenant-related service operations. | ||||
|     /// </summary> | ||||
|     public interface ITenantProvider | ||||
|     { | ||||
|         /// <summary> | ||||
|         /// Creates a new Tenant. | ||||
|         /// </summary> | ||||
|         /// <param name="newTenant">The Tenant to be created.</param> | ||||
|         /// <param name="cancellationToken">A token to cancel the asynchronous operation.</param> | ||||
|         /// <returns> | ||||
|         /// A <see cref="ValueTask{TenantAdapter}"/> representing the asynchronous execution of the service. | ||||
|         /// </returns> | ||||
|         ValueTask<TenantAdapter> CreateTenant(TenantRequest newTenant, CancellationToken cancellationToken); | ||||
|  | ||||
|         /// <summary> | ||||
|         /// Gets a Tenant by its identifier. | ||||
|         /// </summary> | ||||
|         /// <param name="_id">The Tenant Mongo identifier.</param> | ||||
|         /// <param name="cancellationToken">A token to cancel the asynchronous operation.</param> | ||||
|         /// <returns> | ||||
|         /// A <see cref="ValueTask{TenantAdapter}"/> representing the asynchronous execution of the service. | ||||
|         /// </returns> | ||||
|         ValueTask<TenantAdapter> GetTenantById(string _id, CancellationToken cancellationToken); | ||||
|  | ||||
|         /// <summary> | ||||
|         /// Gets all Tenants. | ||||
|         /// </summary> | ||||
|         /// <param name="cancellationToken">A token to cancel the asynchronous operation.</param> | ||||
|         /// <returns> | ||||
|         /// A <see cref="ValueTask{IEnumerable{TenantAdapter}}"/> representing the asynchronous execution of the service. | ||||
|         /// </returns> | ||||
|         ValueTask<IEnumerable<TenantAdapter>> GetAllTenants(CancellationToken cancellationToken); | ||||
|  | ||||
|         /// <summary> | ||||
|         /// Changes the status of a Tenant. | ||||
|         /// </summary> | ||||
|         /// <param name="_id">The Tenant Mongo identifier.</param> | ||||
|         /// <param name="newStatus">The new status of the Tenant.</param> | ||||
|         /// <param name="cancellationToken">A token to cancel the asynchronous operation.</param> | ||||
|         /// <returns> | ||||
|         /// A <see cref="ValueTask{TenantAdapter}"/> representing the asynchronous execution of the service. | ||||
|         /// </returns> | ||||
|         ValueTask<TenantAdapter> ChangeTenantStatus(string _id, Blueprint.Mongo.StatusEnum newStatus, CancellationToken cancellationToken); | ||||
|  | ||||
|         /// <summary> | ||||
|         /// Updates a Tenant. | ||||
|         /// </summary> | ||||
|         /// <param name="entity">The Tenant to be updated.</param> | ||||
|         /// <param name="cancellationToken">A token to cancel the asynchronous operation.</param> | ||||
|         /// <returns> | ||||
|         /// A <see cref="ValueTask{TenantAdapter}"/> representing the asynchronous execution of the service. | ||||
|         /// </returns> | ||||
|         ValueTask<TenantAdapter> UpdateTenant(TenantAdapter entity, CancellationToken cancellationToken); | ||||
|  | ||||
|         /// <summary> | ||||
|         /// Deletes a Tenant by its identifier. | ||||
|         /// </summary> | ||||
|         /// <param name="_id">The Tenant Mongo identifier.</param> | ||||
|         /// <param name="cancellationToken">A token to cancel the asynchronous operation.</param> | ||||
|         /// <returns> | ||||
|         /// A <see cref="ValueTask{TenantAdapter}"/> representing the asynchronous execution of the service. | ||||
|         /// </returns> | ||||
|         ValueTask<TenantAdapter?> DeleteTenant(string _id, CancellationToken cancellationToken); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user