feat(api): в HostResponse добавлена информация о компонентном составе

This commit is contained in:
Mikhail Trubnikov
2023-11-30 10:17:02 +10:00
parent 5cfa2a852f
commit 1222c102f0
7 changed files with 64 additions and 22 deletions

View File

@@ -5,5 +5,7 @@
public Guid Id { get; set; }
public required string Name { get; set; }
public ApplicationTypeResponse? Type { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
namespace PARR.API.Contracts.V1.Responses
{
public class ApplicationTypeResponse
{
public Guid Id { get; set; }
public required string Name { get; set; }
public required string Description { get; set; }
}
}

View File

@@ -0,0 +1,33 @@
namespace PARR.API.Contracts.V1.Responses
{
public class HostBaseResponse
{
public Guid Id { get; set; }
public string Ek { get; set; } = string.Empty;
public required string IP { get; set; }
public string? Status { get; set; }
public string? WorkGroup { get; set; }
public string? ResponseArea { get; set; }
}
/// <summary>
/// Респонс Хоста для Шаблона
/// </summary>
public class HostTemplateResponse : HostBaseResponse
{
}
/// <summary>
/// Респонс Хоста с приложениями (компнентном составе)
/// </summary>
public class HostWithApplicationsResponse : HostBaseResponse
{
public List<ApplicationResponse>? Applications { get; set; }
}
}

View File

@@ -1,17 +0,0 @@
namespace PARR.API.Contracts.V1.Responses
{
public class HostResponse
{
public Guid Id { get; set; }
public string Ek { get; set; }
public required string IP { get; set; }
public string? Status { get; set; }
public string? WorkGroup { get; set; }
public string? ResponseArea { get; set; }
}
}

View File

@@ -22,7 +22,7 @@
public DateTimeOffset NextRun { get; set; }
public HostResponse? Host { get; set; }
public HostTemplateResponse? Host { get; set; }
public WorkResponse? Work { get; set; }
public ProcessResponse? Process { get; set; }