Refactor code structure for improved readability and maintainability
This commit is contained in:
9
Dto/Deployment/Add/AddDeploymentRequestDto.cs
Normal file
9
Dto/Deployment/Add/AddDeploymentRequestDto.cs
Normal 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; } = "{}";
|
||||
}
|
||||
}
|
||||
8
Dto/Deployment/Add/QueueJobStepApprovalDto.cs
Normal file
8
Dto/Deployment/Add/QueueJobStepApprovalDto.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
@@ -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; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
18
Dto/Deployment/Get/GetQueueJobDetailsDto.cs
Normal file
18
Dto/Deployment/Get/GetQueueJobDetailsDto.cs
Normal 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>();
|
||||
}
|
||||
}
|
||||
16
Dto/Deployment/Get/GetQueueJobDto.cs
Normal file
16
Dto/Deployment/Get/GetQueueJobDto.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
15
Dto/Deployment/Get/GetQueueJobStepDto.cs
Normal file
15
Dto/Deployment/Get/GetQueueJobStepDto.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
12
Dto/Deployment/Get/GetQueueJobTargetDto.cs
Normal file
12
Dto/Deployment/Get/GetQueueJobTargetDto.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user