feat(api): HostController вывод даных из таблицы Unit
This commit is contained in:
17
PARR.API/Contracts/V1/Responses/AttributeResponse.cs
Normal file
17
PARR.API/Contracts/V1/Responses/AttributeResponse.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace PARR.API.Contracts.V1.Responses
|
||||
{
|
||||
public class AttributeResponse
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Имя из поля DisplayName, если пустое - берём AihitName
|
||||
/// </summary>
|
||||
public required string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Соответствующее полю значение
|
||||
/// </summary>
|
||||
public required string Value { get; set; }
|
||||
}
|
||||
}
|
||||
18
PARR.API/Contracts/V1/Responses/UnitResponse.cs
Normal file
18
PARR.API/Contracts/V1/Responses/UnitResponse.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace PARR.API.Contracts.V1.Responses
|
||||
{
|
||||
public class UnitResponse
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public required string Name { get; set; }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Response с всеми аттребутами и их значениями
|
||||
/// </summary>
|
||||
public class UnitWithAttributesResponse : UnitResponse
|
||||
{
|
||||
public List<AttributeResponse>? Attributes { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user