Refactor code structure for improved readability and maintainability

This commit is contained in:
Torsten Brendgen
2026-05-16 16:45:28 +02:00
parent 14f856fdb3
commit 96a3e98109
426 changed files with 29236 additions and 114 deletions

View File

@@ -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);

View 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);
}
}

View File

@@ -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();
}
}

View 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();
}
}

View File

@@ -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();
}
}

View File

@@ -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();
}
}