Files
parr_api/PARR.Domain/DTOs/UnitDto/UnitInfo.cs
2026-05-29 17:09:36 +10:00

53 lines
1.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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; }
}
}