Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -7,7 +7,7 @@ namespace Microsoft.SelfService.Portal.Core.API.Interfaces
|
||||
ICollection<DeploymentGroupModel> GetDeploymentGroups();
|
||||
|
||||
DeploymentGroupModel GetDeploymentGroupById(Guid Id);
|
||||
bool AddDeploymentGroupById(DeploymentGroupModel deploymentgroup);
|
||||
bool AddDeploymentGroupById(DeploymentGroupModel deploymentgroup, ICollection<Guid>? virtualMachineIds);
|
||||
bool DeleteDeploymentGroupById(DeploymentGroupModel deploymentgroup);
|
||||
bool EditDeploymentGroupById(DeploymentGroupModel deploymentgroup);
|
||||
|
||||
|
||||
11
Interfaces/IQueueJobService.cs
Normal file
11
Interfaces/IQueueJobService.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Microsoft.SelfService.Portal.Core.API.Interfaces
|
||||
{
|
||||
public interface IQueueJobService
|
||||
{
|
||||
Guid EnqueueTemplateJsonChanged(Guid templateId, string oldJsonData, string newJsonData);
|
||||
Guid EnqueueDeploymentRequest(Guid deploymentGroupId, ICollection<Guid> virtualMachineIds, string jsonData);
|
||||
bool RetryQueueJob(Guid queueJobId);
|
||||
bool ApproveQueueJobStep(Guid queueJobStepId, string approvedBy, string? comment);
|
||||
bool RejectQueueJobStep(Guid queueJobStepId, string approvedBy, string? comment);
|
||||
}
|
||||
}
|
||||
@@ -5,12 +5,26 @@ namespace Microsoft.SelfService.Portal.Core.API.Interfaces
|
||||
public interface IServiceInterface
|
||||
{
|
||||
ICollection<ServiceModel> GetServices();
|
||||
|
||||
bool AddServiceById(ServiceModel service);
|
||||
bool EditServiceById(ServiceModel service);
|
||||
bool DeleteServiceById(ServiceModel service);
|
||||
|
||||
ServiceModel GetServiceById(Guid Id);
|
||||
bool CheckServiceById(Guid Id);
|
||||
|
||||
ServiceModel GetServiceByName(string Name);
|
||||
bool CheckServiceByName(string Name);
|
||||
|
||||
ICollection<ServiceRoleDefinitionModel> GetRoleDefinitionsByServiceId(Guid serviceId);
|
||||
ServiceRoleDefinitionModel GetRoleDefinitionById(Guid roleDefinitionId);
|
||||
bool AddRoleDefinition(ServiceRoleDefinitionModel roleDefinition);
|
||||
bool EditRoleDefinition(ServiceRoleDefinitionModel roleDefinition);
|
||||
bool DeleteRoleDefinition(ServiceRoleDefinitionModel roleDefinition);
|
||||
bool CheckRoleDefinitionById(Guid roleDefinitionId);
|
||||
bool CheckRoleDefinitionKey(Guid serviceId, string key, Guid? excludeRoleDefinitionId = null);
|
||||
|
||||
bool SaveChanges();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
20
Interfaces/ITemplateCategoryInterface.cs
Normal file
20
Interfaces/ITemplateCategoryInterface.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Microsoft.SelfService.Portal.Core.API.Models;
|
||||
|
||||
namespace Microsoft.SelfService.Portal.Core.API.Interfaces
|
||||
{
|
||||
public interface ITemplateCategoryInterface
|
||||
{
|
||||
ICollection<TemplateCategoryModel> GetTemplateCategories();
|
||||
|
||||
bool AddTemplateCategoryById(TemplateCategoryModel templateCategory);
|
||||
bool EditTemplateCategoryById(TemplateCategoryModel templateCategory);
|
||||
bool DeleteTemplateCategoryById(TemplateCategoryModel templateCategory);
|
||||
|
||||
TemplateCategoryModel GetTemplateCategoryById(Guid Id);
|
||||
|
||||
bool CheckTemplateCategoryById(Guid Id);
|
||||
TemplateCategoryModel GetTemplateCategoryByName(string Name);
|
||||
bool CheckTemplateCategoryByName(string Name);
|
||||
bool SaveChanges();
|
||||
}
|
||||
}
|
||||
@@ -6,8 +6,15 @@ namespace Microsoft.SelfService.Portal.Core.API.Interfaces
|
||||
{
|
||||
ICollection<TemplateModel> GetTemplates();
|
||||
|
||||
bool AddTemplateById(TemplateModel template);
|
||||
bool EditTemplateById(TemplateModel template);
|
||||
bool DeleteTemplateById(TemplateModel template);
|
||||
|
||||
TemplateModel GetTemplateById(Guid Id);
|
||||
|
||||
bool CheckTemplateById(Guid Id);
|
||||
TemplateModel GetTemplateByName(string Name);
|
||||
bool CheckTemplateByName(string Name);
|
||||
bool SaveChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,10 +6,15 @@ namespace Microsoft.SelfService.Portal.Core.API.Interfaces
|
||||
public interface IVirtualMachineInterface
|
||||
{
|
||||
ICollection<VirtualMachineModel> GetVirtualMachines();
|
||||
bool AddVirtualMachineById(VirtualMachineModel virtualMachine);
|
||||
bool EditVirtualMachineById(VirtualMachineModel virtualMachine);
|
||||
bool DeleteVirtualMachineById(VirtualMachineModel virtualMachine);
|
||||
|
||||
VirtualMachineModel GetVirtualMachineById(Guid Id);
|
||||
VirtualMachineModel GetVirtualMachineByName(string Name);
|
||||
|
||||
bool CheckVirtualMachineById(Guid Id);
|
||||
bool CheckVirtualMachineByName(String Name);
|
||||
bool SaveChanges();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user