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

@@ -0,0 +1,9 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Add
{
public class AddDeploymentRequestDto
{
public Guid DeploymentGroupId { get; set; }
public ICollection<Guid> VirtualMachineIds { get; set; } = new List<Guid>();
public string JsonData { get; set; } = "{}";
}
}

View File

@@ -0,0 +1,8 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Add
{
public class QueueJobStepApprovalDto
{
public string? Comment { get; set; }
public string? ApprovedBy { get; set; }
}
}

View File

@@ -1,16 +1,13 @@
using Microsoft.SelfService.Portal.Core.API.Dto.DeploymentGroup.Get;
using Microsoft.SelfService.Portal.Core.API.Dto.VirtualMachine.Get;
namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Get
{
public class GetDeploymentDetailsDto : BaseDetailsDto
{
public Guid VirtualMachineId { get; set; }
public string Status { get; set; }
public string JSONData { get; set; }
public GetVirtualMachineDetailsDto VirtualMachine { get; set; }
public GetDeploymentGroupDetailsDto DeploymentGroup { get; set; }
}
}

View File

@@ -4,7 +4,9 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Get
{
public class GetDeploymentDto : BaseDto
{
public Guid DeploymentGroupId { get; set; }
public Guid VirtualMachineId { get; set; }
public string Status { get; set; }
public string JSONData { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Get
{
public class GetQueueJobDetailsDto : BaseDetailsDto
{
public string Type { get; set; } = string.Empty;
public string Status { get; set; } = string.Empty;
public string PayloadJson { get; set; } = string.Empty;
public int Attempts { get; set; }
public int MaxAttempts { get; set; }
public DateTime? Started { get; set; }
public DateTime? Finished { get; set; }
public string? ErrorMessage { get; set; }
public string? MetadataJson { get; set; }
public string? RuleSnapshotJson { get; set; }
public ICollection<GetQueueJobTargetDto> Targets { get; set; } = new List<GetQueueJobTargetDto>();
public ICollection<GetQueueJobStepDto> Steps { get; set; } = new List<GetQueueJobStepDto>();
}
}

View File

@@ -0,0 +1,16 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Get
{
public class GetQueueJobDto : BaseDto
{
public string Type { get; set; } = string.Empty;
public string Status { get; set; } = string.Empty;
public int Attempts { get; set; }
public int MaxAttempts { get; set; }
public DateTime? Started { get; set; }
public DateTime? Finished { get; set; }
public string? ErrorMessage { get; set; }
public int TargetCount { get; set; }
public int SucceededTargetCount { get; set; }
public int FailedTargetCount { get; set; }
}
}

View File

@@ -0,0 +1,15 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Get
{
public class GetQueueJobStepDto : BaseDto
{
public Guid? DependsOnQueueJobStepId { get; set; }
public int SortOrder { get; set; }
public string Name { get; set; } = string.Empty;
public string StepType { get; set; } = string.Empty;
public string Status { get; set; } = string.Empty;
public string? MetadataJson { get; set; }
public DateTime? ApprovedAt { get; set; }
public string? ApprovedBy { get; set; }
public string? ApprovalComment { get; set; }
}
}

View File

@@ -0,0 +1,12 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Get
{
public class GetQueueJobTargetDto : BaseDto
{
public Guid VirtualMachineId { get; set; }
public Guid DeploymentGroupId { get; set; }
public Guid TemplateId { get; set; }
public string Status { get; set; } = string.Empty;
public int Attempts { get; set; }
public string? ErrorMessage { get; set; }
}
}