53 lines
1.3 KiB
C#
53 lines
1.3 KiB
C#
|
|
namespace PARR.Domain.DTOs.UnitDto
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// Юнит с ЕСПП атрибутами, детьми и родителями и их атрибутами
|
|||
|
|
/// </summary>
|
|||
|
|
public record UnitInfo : UnitInfoBase
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// Родительские юниты
|
|||
|
|
/// </summary>
|
|||
|
|
public IReadOnlyCollection<UnitInfoBase> ParentUnits { get; init; } = [];
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Дочерние юниты
|
|||
|
|
/// </summary>
|
|||
|
|
public IReadOnlyCollection<UnitInfoBase> ChildUnits { get; init; } = [];
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public record UnitInfoBase
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// Id юнита
|
|||
|
|
/// </summary>
|
|||
|
|
public Guid Id { get; init; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// ЭК
|
|||
|
|
/// </summary>
|
|||
|
|
public required string Name { get; init; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Атрибуты из ЕСПП
|
|||
|
|
/// </summary>
|
|||
|
|
public IReadOnlyCollection<UnitInfoAttribute> Values { get; init; } = [];
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Атрибут ЕСПП
|
|||
|
|
/// </summary>
|
|||
|
|
public record UnitInfoAttribute
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// ИД поля
|
|||
|
|
/// </summary>
|
|||
|
|
public Guid FieldId { get; init; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Значение
|
|||
|
|
/// </summary>
|
|||
|
|
public string? Value { get; init; }
|
|||
|
|
}
|
|||
|
|
}
|