Files
jinko.yikatong/Src/Dlhis.Basic/Device/Response/DeviceGroupTreeResponse.cs
2024-10-11 15:12:35 +08:00

72 lines
1.4 KiB
C#

using Dlhis.Entity.Device.Enums;
using Kurisu.AspNetCore.Utils.Extensions;
using Newtonsoft.Json;
namespace Dlhis.Basic.Device.Response;
public class DeviceGroupTreeResponse
{
public long Id { get; set; }
/// <summary>
/// 上级分组code
/// </summary>
public Guid? PCode { get; set; }
/// <summary>
/// 分组code/设备code
/// </summary>
public Guid Code { get; set; }
/// <summary>
/// 分组名称/设备名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 设备组类型
/// </summary>
public DeviceTypeEnumType? Type { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 分组类型描述
/// </summary>
public string TypeDesc
{
get
{
if (!Type.HasValue)
{
return string.Empty;
}
return Type.Value.GetDescription();
}
}
public bool Editable { get; set; }
/// <summary>
/// 是否允许设置下级
/// </summary>
public bool AbleSetNext { get; set; }
[JsonIgnore]
public string TenantId { get; set; }
/// <summary>
/// 是否作为方可预约组
/// </summary>
public bool AsAppointment { get; set; }
/// <summary>
/// 下级
/// </summary>
public List<DeviceGroupTreeResponse> Next { get; set; } = new();
}