Refactor code structure for improved readability and maintainability

This commit is contained in:
Torsten Brendgen
2026-07-07 23:27:57 +02:00
parent 96a3e98109
commit bbe521b38d
1632 changed files with 27313 additions and 54917 deletions
+1
View File
@@ -6,3 +6,4 @@
public Guid DomainId { get; set; }
}
}
+1
View File
@@ -27,3 +27,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto
public string CreatedBy { get; set; } = "System";
}
}
+1
View File
@@ -12,3 +12,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto
public Guid Id { get; set; }
}
}
+2 -1
View File
@@ -3,10 +3,11 @@
public class AddDeploymentDto
{
public Guid DeploymentGroupId { get; set; }
public Guid VirtualMachineId { get; set; }
public Guid TargetId { get; set; }
public string Status { get; set; }
public string JsonData { get; set; }
}
}
@@ -1,9 +1,10 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Add
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 ICollection<Guid> TargetIds { get; set; } = new List<Guid>();
public string JsonData { get; set; } = "{}";
}
}
@@ -1,4 +1,4 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Add
namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Add
{
public class QueueJobStepApprovalDto
{
@@ -6,3 +6,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Add
public string? ApprovedBy { get; set; }
}
}
+2 -1
View File
@@ -11,9 +11,10 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Edit
public string jsonData { get; set; }
[Column(Order = 1)]
public Guid VirtualMachineId { get; set; }
public Guid TargetId { get; set; }
[Column(Order = 1)]
public Guid DeploymentGroupId { get; set; }
}
}
@@ -1,13 +1,14 @@
using Microsoft.SelfService.Portal.Core.API.Dto.VirtualMachine.Get;
using Microsoft.SelfService.Portal.Core.API.Dto.Target.Get;
namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Get
{
public class GetDeploymentDetailsDto : BaseDetailsDto
{
public Guid VirtualMachineId { get; set; }
public Guid TargetId { get; set; }
public string Status { get; set; }
public string JSONData { get; set; }
public GetVirtualMachineDetailsDto VirtualMachine { get; set; }
public GetTargetDetailsDto Target { get; set; }
}
}
+2 -1
View File
@@ -5,8 +5,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 Guid TargetId { get; set; }
public string Status { get; set; }
public string JSONData { get; set; }
}
}
+2 -1
View File
@@ -1,4 +1,4 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Get
namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Get
{
public class GetQueueJobDetailsDto : BaseDetailsDto
{
@@ -16,3 +16,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Get
public ICollection<GetQueueJobStepDto> Steps { get; set; } = new List<GetQueueJobStepDto>();
}
}
+2 -1
View File
@@ -1,4 +1,4 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Get
namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Get
{
public class GetQueueJobDto : BaseDto
{
@@ -14,3 +14,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Get
public int FailedTargetCount { get; set; }
}
}
+2 -1
View File
@@ -1,4 +1,4 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Get
namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Get
{
public class GetQueueJobStepDto : BaseDto
{
@@ -13,3 +13,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Get
public string? ApprovalComment { get; set; }
}
}
+3 -2
View File
@@ -1,8 +1,8 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Get
namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Get
{
public class GetQueueJobTargetDto : BaseDto
{
public Guid VirtualMachineId { get; set; }
public Guid TargetId { get; set; }
public Guid DeploymentGroupId { get; set; }
public Guid TemplateId { get; set; }
public string Status { get; set; } = string.Empty;
@@ -10,3 +10,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Get
public string? ErrorMessage { get; set; }
}
}
@@ -0,0 +1,20 @@
using System.ComponentModel.DataAnnotations.Schema;
namespace Microsoft.SelfService.Portal.Core.API.Dto.DeploymentBatch.Add
{
public class AddDeploymentBatchDto
{
[Column(Order = 1)]
public Guid TemplateId { get; set; }
[Column(Order = 2)]
public Guid? DeploymentRuleId { get; set; }
[Column(Order = 3)]
public string Status { get; set; } = string.Empty;
[Column(Order = 4)]
public ICollection<Guid>? TargetIds { get; set; }
}
}
@@ -0,0 +1,17 @@
using System.ComponentModel.DataAnnotations.Schema;
namespace Microsoft.SelfService.Portal.Core.API.Dto.DeploymentBatch.Edit
{
public class EditDeploymentBatchDto
{
[Column(Order = 1)]
public Guid TemplateId { get; set; }
[Column(Order = 2)]
public Guid? DeploymentRuleId { get; set; }
[Column(Order = 3)]
public string Status { get; set; } = string.Empty;
}
}
@@ -0,0 +1,21 @@
using Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Get;
using Microsoft.SelfService.Portal.Core.API.Dto.DeploymentComposition.Get;
using Microsoft.SelfService.Portal.Core.API.Dto.Template.Get;
namespace Microsoft.SelfService.Portal.Core.API.Dto.DeploymentBatch.Get
{
public class GetDeploymentBatchDetailsDto : BaseDto
{
public Guid? DeploymentRuleId { get; set; }
public string Status { get; set; } = string.Empty;
public GetTemplateDetailsDto Template { get; set; } = null!;
public ICollection<GetDeploymentDetailsDto> Deployments { get; set; } = new List<GetDeploymentDetailsDto>();
public ICollection<GetDeploymentTemplateSelectionDto> TemplateSelections { get; set; } = new List<GetDeploymentTemplateSelectionDto>();
public ICollection<GetDeploymentParameterValueDto> ParameterValues { get; set; } = new List<GetDeploymentParameterValueDto>();
public ICollection<GetDeploymentTargetAssignmentDto> TargetAssignments { get; set; } = new List<GetDeploymentTargetAssignmentDto>();
}
}
@@ -0,0 +1,12 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.DeploymentBatch.Get
{
public class GetDeploymentBatchDto : BaseDetailsDto
{
public Guid TemplateId { get; set; }
public Guid? DeploymentRuleId { get; set; }
public string Status { get; set; } = string.Empty;
}
}
@@ -0,0 +1,12 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.DeploymentComposition.Add
{
public class AddDeploymentParameterValueDto
{
public Guid? DeploymentTemplateSelectionId { get; set; }
public string Name { get; set; } = string.Empty;
public string ValueJson { get; set; } = "{}";
public bool IsSecretReference { get; set; }
public bool IsOverride { get; set; } = true;
}
}
@@ -0,0 +1,11 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.DeploymentComposition.Add
{
public class AddDeploymentTargetAssignmentDto
{
public Guid TargetId { get; set; }
public string RoleKey { get; set; } = "Node";
public int SortOrder { get; set; }
public string NodeDataJson { get; set; } = "{}";
}
}
@@ -0,0 +1,11 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.DeploymentComposition.Add
{
public class AddDeploymentTemplateSelectionDto
{
public Guid TemplateVersionId { get; set; }
public string TemplateRole { get; set; } = "Service";
public int SortOrder { get; set; }
public string? Alias { get; set; }
}
}
@@ -0,0 +1,11 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.DeploymentComposition.Get
{
public class GetDeploymentCompositionDto
{
public Guid DeploymentBatchId { get; set; }
public ICollection<GetDeploymentTemplateSelectionDto> TemplateSelections { get; set; } = new List<GetDeploymentTemplateSelectionDto>();
public ICollection<GetDeploymentParameterValueDto> ParameterValues { get; set; } = new List<GetDeploymentParameterValueDto>();
public ICollection<GetDeploymentTargetAssignmentDto> TargetAssignments { get; set; } = new List<GetDeploymentTargetAssignmentDto>();
}
}
@@ -0,0 +1,13 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.DeploymentComposition.Get
{
public class GetDeploymentParameterValueDto : BaseDto
{
public Guid DeploymentGroupId { get; set; }
public Guid? DeploymentTemplateSelectionId { get; set; }
public string Name { get; set; } = string.Empty;
public string ValueJson { get; set; } = "{}";
public bool IsSecretReference { get; set; }
public bool IsOverride { get; set; }
}
}
@@ -0,0 +1,15 @@
using Microsoft.SelfService.Portal.Core.API.Dto.Target.Get;
namespace Microsoft.SelfService.Portal.Core.API.Dto.DeploymentComposition.Get
{
public class GetDeploymentTargetAssignmentDto : BaseDto
{
public Guid DeploymentGroupId { get; set; }
public Guid TargetId { get; set; }
public string RoleKey { get; set; } = string.Empty;
public int SortOrder { get; set; }
public string NodeDataJson { get; set; } = "{}";
public GetTargetDto? Target { get; set; }
}
}
@@ -0,0 +1,15 @@
using Microsoft.SelfService.Portal.Core.API.Dto.TemplateVersion.Get;
namespace Microsoft.SelfService.Portal.Core.API.Dto.DeploymentComposition.Get
{
public class GetDeploymentTemplateSelectionDto : BaseDto
{
public Guid DeploymentGroupId { get; set; }
public Guid TemplateVersionId { get; set; }
public string TemplateRole { get; set; } = string.Empty;
public int SortOrder { get; set; }
public string? Alias { get; set; }
public GetTemplateVersionDto? TemplateVersion { get; set; }
}
}
@@ -1,15 +0,0 @@
using System.ComponentModel.DataAnnotations.Schema;
namespace Microsoft.SelfService.Portal.Core.API.Dto.DeploymentGroup.Add
{
public class AddDeploymentGroupDto
{
[Column(Order = 1)]
public Guid TemplateId { get; set; }
[Column(Order = 2)]
public string Status { get; set; }
[Column(Order = 3)]
public ICollection<Guid>? VirtualMachineIds { get; set; }
}
}
@@ -1,12 +0,0 @@
using System.ComponentModel.DataAnnotations.Schema;
namespace Microsoft.SelfService.Portal.Core.API.Dto.DeploymentGroup.Edit
{
public class EditDeploymentGroupDto
{
[Column(Order = 1)]
public Guid TemplateId { get; set; }
[Column(Order = 2)]
public string Status { get; set; }
}
}
@@ -1,14 +0,0 @@
using Microsoft.SelfService.Portal.Core.API.Dto.Deployment.Get;
using Microsoft.SelfService.Portal.Core.API.Dto.Template.Get;
namespace Microsoft.SelfService.Portal.Core.API.Dto.DeploymentGroup.Get
{
public class GetDeploymentGroupDetailsDto : BaseDto
{
public string Status { get; set; }
public GetTemplateDetailsDto Template { get; set; }
public ICollection <GetDeploymentDetailsDto> Deployments { get; set; }
}
}
@@ -1,8 +0,0 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.DeploymentGroup.Get
{
public class GetDeploymentGroupDto
{
public Guid Id { get; set; }
public string Status { get; set; }
}
}
@@ -0,0 +1,11 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.DeploymentRule.Add
{
public class AddDeploymentRuleDto
{
public string Name { get; set; }
public string? Description { get; set; }
public bool IsActive { get; set; } = true;
public ICollection<AddDeploymentRuleStepDto> Steps { get; set; } = new List<AddDeploymentRuleStepDto>();
}
}
@@ -0,0 +1,12 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.DeploymentRule.Add
{
public class AddDeploymentRuleStepDto
{
public int SortOrder { get; set; }
public string Name { get; set; }
public string StepType { get; set; }
public bool RequiresApproval { get; set; }
public string? MetadataJson { get; set; }
}
}
@@ -0,0 +1,11 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.DeploymentRule.Get
{
public class GetDeploymentRuleDto : BaseDetailsDto
{
public string Name { get; set; }
public string? Description { get; set; }
public bool IsActive { get; set; }
public ICollection<GetDeploymentRuleStepDto> Steps { get; set; } = new List<GetDeploymentRuleStepDto>();
}
}
@@ -0,0 +1,12 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.DeploymentRule.Get
{
public class GetDeploymentRuleStepDto : BaseDetailsDto
{
public int SortOrder { get; set; }
public string Name { get; set; }
public string StepType { get; set; }
public bool RequiresApproval { get; set; }
public string? MetadataJson { get; set; }
}
}
+1
View File
@@ -12,3 +12,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Domain.Add
public string NetBIOS { get; set; }
}
}
+1
View File
@@ -12,3 +12,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Domain.Edit
public string NetBIOS { get; set; }
}
}
+1
View File
@@ -13,3 +13,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Domain.Get
}
}
+1
View File
@@ -12,3 +12,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Domain.Get
public string Name { get; set; }
}
}
@@ -9,3 +9,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Domain.Get
}
}
@@ -16,3 +16,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Domain.Get
public ICollection<GetDomainEnvironmentDetailsDto> EnvironmentDomains { get; set; }
}
}
@@ -1,10 +1,10 @@
using Microsoft.SelfService.Portal.Core.API.Dto.VirtualMachine.Get;
using Microsoft.SelfService.Portal.Core.API.Dto.Target.Get;
using Microsoft.SelfService.Portal.Core.API.Models;
using System.ComponentModel.DataAnnotations.Schema;
namespace Microsoft.SelfService.Portal.Core.API.Dto.Domain.Get
{
public class GetDomainVirtualMachineDetailsDto : BaseDetailsDto
public class GetDomainTargetDetailsDto : BaseDetailsDto
{
[Column(Order = 1)]
@@ -15,6 +15,7 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Domain.Get
public string NetBIOS { get; set; }
[Column(Order = 4)]
public ICollection<GetVirtualMachineDto> VirtualMachines { get; set; }
public ICollection<GetTargetDto> Targets { get; set; }
}
}
+8 -4
View File
@@ -8,18 +8,22 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Environment.Add
public string Name { get; set; }
[Column(Order = 2)]
public string EnvironmentType { get; set; } = "OnPrem";
public string EnvironmentType { get; set; } = "Test";
[Column(Order = 3)]
public string? ProviderType { get; set; }
public string HostingType { get; set; } = "OnPrem";
[Column(Order = 4)]
public string? TenantId { get; set; }
public string? ProviderType { get; set; }
[Column(Order = 5)]
public string? SubscriptionId { get; set; }
public string? TenantId { get; set; }
[Column(Order = 6)]
public string? SubscriptionId { get; set; }
[Column(Order = 7)]
public string? MetadataJson { get; set; }
}
}
+8 -4
View File
@@ -8,18 +8,22 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Environment.Edit
public string Name { get; set; }
[Column(Order = 2)]
public string EnvironmentType { get; set; } = "OnPrem";
public string EnvironmentType { get; set; } = "Test";
[Column(Order = 3)]
public string? ProviderType { get; set; }
public string HostingType { get; set; } = "OnPrem";
[Column(Order = 4)]
public string? TenantId { get; set; }
public string? ProviderType { get; set; }
[Column(Order = 5)]
public string? SubscriptionId { get; set; }
public string? TenantId { get; set; }
[Column(Order = 6)]
public string? SubscriptionId { get; set; }
[Column(Order = 7)]
public string? MetadataJson { get; set; }
}
}
@@ -11,15 +11,19 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Environment.Get
public string EnvironmentType { get; set; }
[Column(Order = 3)]
public string? ProviderType { get; set; }
public string HostingType { get; set; }
[Column(Order = 4)]
public string? TenantId { get; set; }
public string? ProviderType { get; set; }
[Column(Order = 5)]
public string? SubscriptionId { get; set; }
public string? TenantId { get; set; }
[Column(Order = 6)]
public string? SubscriptionId { get; set; }
[Column(Order = 7)]
public string? MetadataJson { get; set; }
}
}
@@ -1,4 +1,4 @@
using Microsoft.SelfService.Portal.Core.API.Dto.Domain.Get;
using Microsoft.SelfService.Portal.Core.API.Dto.Domain.Get;
using Microsoft.SelfService.Portal.Core.API.Models;
using System.ComponentModel.DataAnnotations.Schema;
@@ -32,3 +32,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Environment.Get
}
}
}
+26 -1
View File
@@ -1,4 +1,4 @@
using Microsoft.SelfService.Portal.Core.API.Models;
using Microsoft.SelfService.Portal.Core.API.Models;
using System.ComponentModel.DataAnnotations.Schema;
namespace Microsoft.SelfService.Portal.Core.API.Dto.Environment.Get
@@ -9,6 +9,24 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Environment.Get
public string Name { get; set; }
[Column(Order = 2)]
public string EnvironmentType { get; set; }
[Column(Order = 3)]
public string HostingType { get; set; }
[Column(Order = 4)]
public string? ProviderType { get; set; }
[Column(Order = 5)]
public string? TenantId { get; set; }
[Column(Order = 6)]
public string? SubscriptionId { get; set; }
[Column(Order = 7)]
public string? MetadataJson { get; set; }
[Column(Order = 8)]
public ICollection<GetEnvironmentDomainDetailsDto> EnvironmentDomains { get; set; }
public static GetEnvironmentDomainDto FromModel(EnvironmentModel environment)
@@ -17,6 +35,12 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Environment.Get
{
Id = environment.Id,
Name = environment.Name,
EnvironmentType = environment.EnvironmentType,
HostingType = environment.HostingType,
ProviderType = environment.ProviderType,
TenantId = environment.TenantId,
SubscriptionId = environment.SubscriptionId,
MetadataJson = environment.MetadataJson,
Created = environment.Created,
CreatedBy = environment.CreatedBy,
Modified = environment.Modified,
@@ -29,3 +53,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Environment.Get
}
}
}
+6 -2
View File
@@ -11,12 +11,16 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Environment.Get
public string EnvironmentType { get; set; }
[Column(Order = 3)]
public string? ProviderType { get; set; }
public string HostingType { get; set; }
[Column(Order = 4)]
public string? TenantId { get; set; }
public string? ProviderType { get; set; }
[Column(Order = 5)]
public string? TenantId { get; set; }
[Column(Order = 6)]
public string? SubscriptionId { get; set; }
}
}
-13
View File
@@ -1,13 +0,0 @@
using System.ComponentModel.DataAnnotations.Schema;
namespace Microsoft.SelfService.Portal.Core.API.Dto.Runbook.Add
{
public class AddRunbookDto
{
[Column(Order = 1)]
public string Name { get; set; }
[Column(Order = 2)]
public string Description { get; set; }
}
}
-13
View File
@@ -1,13 +0,0 @@
using System.ComponentModel.DataAnnotations.Schema;
namespace Microsoft.SelfService.Portal.Core.API.Dto.Runbook.Get
{
public class GetRunbookDetailsDto : BaseDetailsDto
{
[Column(Order = 1)]
public string Name { get; set; }
[Column(Order = 2)]
public string Decription { get; set; }
}
}
-13
View File
@@ -1,13 +0,0 @@
using System.ComponentModel.DataAnnotations.Schema;
namespace Microsoft.SelfService.Portal.Core.API.Dto.Runbook.Get
{
public class GetRunbookDto : BaseDto
{
[Column(Order = 1)]
public string Name { get; set; }
[Column(Order = 2)]
public string Decription { get; set; }
}
}
+2 -1
View File
@@ -1,4 +1,4 @@
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations.Schema;
namespace Microsoft.SelfService.Portal.Core.API.Dto.Service.Add
{
@@ -17,3 +17,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Service.Add
public string? IconKey { get; set; }
}
}
+2 -1
View File
@@ -1,4 +1,4 @@
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations.Schema;
namespace Microsoft.SelfService.Portal.Core.API.Dto.Service.Edit
{
@@ -17,3 +17,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Service.Edit
public string? IconKey { get; set; }
}
}
+1
View File
@@ -14,3 +14,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Service.Get
public string? IconKey { get; set; }
}
}
+1
View File
@@ -17,3 +17,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Service.Get
public string? IconKey { get; set; }
}
}
@@ -1,4 +1,4 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.Service.RoleDefinition
namespace Microsoft.SelfService.Portal.Core.API.Dto.Service.RoleDefinition
{
public class AddServiceRoleDefinitionDto
{
@@ -7,3 +7,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Service.RoleDefinition
public string? Description { get; set; }
}
}
@@ -1,4 +1,4 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.Service.RoleDefinition
namespace Microsoft.SelfService.Portal.Core.API.Dto.Service.RoleDefinition
{
public class EditServiceRoleDefinitionDto
{
@@ -7,3 +7,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Service.RoleDefinition
public string? Description { get; set; }
}
}
+13
View File
@@ -0,0 +1,13 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.Target.Add
{
public class AddTargetDto
{
public Guid? DomainID { get; set; }
public string Name { get; set; }
public string TargetType { get; set; } = "VirtualMachine";
public string ProviderType { get; set; } = "OnPrem";
public string? ExternalId { get; set; }
public string? MetadataJson { get; set; }
}
}
+12
View File
@@ -0,0 +1,12 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.Target.Edit
{
public class EditTargetDto
{
public string Name { get; set; }
public string TargetType { get; set; } = "VirtualMachine";
public string ProviderType { get; set; } = "OnPrem";
public string? ExternalId { get; set; }
public string? MetadataJson { get; set; }
}
}
@@ -2,9 +2,9 @@
using Microsoft.SelfService.Portal.Core.API.Models;
using System.ComponentModel.DataAnnotations.Schema;
namespace Microsoft.SelfService.Portal.Core.API.Dto.VirtualMachine.Get
namespace Microsoft.SelfService.Portal.Core.API.Dto.Target.Get
{
public class GetVirtualMachineDetailsDto : BaseDetailsDto
public class GetTargetDetailsDto : BaseDetailsDto
{
[Column(Order = 1)]
@@ -14,11 +14,18 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.VirtualMachine.Get
public string Name { get; set; }
[Column(Order = 3)]
public string? ExternalId { get; set; }
public string TargetType { get; set; }
[Column(Order = 4)]
public string ProviderType { get; set; }
[Column(Order = 5)]
public string? ExternalId { get; set; }
[Column(Order = 6)]
public string? MetadataJson { get; set; }
public GetDomainDto? Domain { get; set; }
}
}
@@ -1,8 +1,8 @@
using System.ComponentModel.DataAnnotations.Schema;
namespace Microsoft.SelfService.Portal.Core.API.Dto.VirtualMachine.Get
namespace Microsoft.SelfService.Portal.Core.API.Dto.Target.Get
{
public class GetVirtualMachineDto : BaseDto
public class GetTargetDto : BaseDto
{
[Column(Order = 1)]
public Guid? DomainID { get; set; }
@@ -11,7 +11,14 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.VirtualMachine.Get
public string Name { get; set; }
[Column(Order = 3)]
public string TargetType { get; set; }
[Column(Order = 4)]
public string ProviderType { get; set; }
[Column(Order = 5)]
public string? ExternalId { get; set; }
}
}
+2 -1
View File
@@ -1,4 +1,4 @@
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations.Schema;
namespace Microsoft.SelfService.Portal.Core.API.Dto.Template.Add
{
@@ -20,3 +20,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Template.Add
public string JSONData { get; set; }
}
}
+2 -1
View File
@@ -1,4 +1,4 @@
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations.Schema;
namespace Microsoft.SelfService.Portal.Core.API.Dto.Template.Edit
{
@@ -20,3 +20,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.Template.Edit
public string JSONData { get; set; }
}
}
@@ -10,3 +10,4 @@
}
}
+1
View File
@@ -9,3 +9,4 @@
public string JSONData { get; set; }
}
}
@@ -1,4 +1,4 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.TemplateCategory.Add
namespace Microsoft.SelfService.Portal.Core.API.Dto.TemplateCategory.Add
{
public class AddTemplateCategoryDto
{
@@ -9,3 +9,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.TemplateCategory.Add
public string? Color { get; set; }
}
}
@@ -1,4 +1,4 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.TemplateCategory.Edit
namespace Microsoft.SelfService.Portal.Core.API.Dto.TemplateCategory.Edit
{
public class EditTemplateCategoryDto
{
@@ -9,3 +9,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.TemplateCategory.Edit
public string? Color { get; set; }
}
}
@@ -1,4 +1,4 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.TemplateCategory.Get
namespace Microsoft.SelfService.Portal.Core.API.Dto.TemplateCategory.Get
{
public class GetTemplateCategoryDetailsDto : BaseDetailsDto
{
@@ -9,3 +9,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.TemplateCategory.Get
public string? Color { get; set; }
}
}
@@ -1,4 +1,4 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.TemplateCategory.Get
namespace Microsoft.SelfService.Portal.Core.API.Dto.TemplateCategory.Get
{
public class GetTemplateCategoryDto : BaseDto
{
@@ -9,3 +9,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.TemplateCategory.Get
public string? Color { get; set; }
}
}
@@ -0,0 +1,12 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.TemplateVersion.Add
{
public class AddTemplateVersionDto
{
public string Version { get; set; } = "1.0.0";
public string JsonData { get; set; } = "{}";
public string SchemaVersion { get; set; } = "1.0";
public bool Publish { get; set; }
public string? PublishedBy { get; set; }
}
}
@@ -0,0 +1,15 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.TemplateVersion.Get
{
public class GetTemplateVersionDto : BaseDetailsDto
{
public Guid TemplateId { get; set; }
public string Version { get; set; } = string.Empty;
public string JsonData { get; set; } = "{}";
public string JsonHash { get; set; } = string.Empty;
public string SchemaVersion { get; set; } = "1.0";
public bool IsPublished { get; set; }
public DateTime? PublishedAt { get; set; }
public string? PublishedBy { get; set; }
}
}
@@ -1,10 +0,0 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.VirtualMachine.Add
{
public class AddVirtualMachineDto
{
public Guid? DomainID { get; set; }
public string Name { get; set; }
public string? ExternalId { get; set; }
public string? MetadataJson { get; set; }
}
}
@@ -1,9 +0,0 @@
namespace Microsoft.SelfService.Portal.Core.API.Dto.VirtualMachine.Edit
{
public class EditVirtualMachineDto
{
public string Name { get; set; }
public string? ExternalId { get; set; }
public string? MetadataJson { get; set; }
}
}