Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -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,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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user