using Newtonsoft.Json;
|
using System.Collections.Generic;
|
|
namespace NewPdaSqlServer.Dto.Simple;
|
|
/// <summary>
|
/// 树形结构DTO - 适配 Layui Tree 组件
|
/// </summary>
|
public class TreeViewDto
|
{
|
[JsonProperty("id")]
|
public long Id { get; set; }
|
|
[JsonProperty("title")]
|
public string? Title { get; set; }
|
|
[JsonProperty("field")]
|
public string? Field { get; set; } // 对应 Code
|
|
[JsonProperty("spread")]
|
public bool Spread { get; set; } // 对应 IsExpanded
|
|
/// <summary>
|
/// 跳转链接 (Layui Tree点击时需要)
|
/// </summary>
|
[JsonProperty("href")]
|
public string? Href { get; set; } // 对应 Url
|
|
/// <summary>
|
/// 节点类型 (前端图标判断依据)
|
/// </summary>
|
[JsonProperty("nodeType")]
|
public int NodeType { get; set; }
|
|
[JsonProperty("children")]
|
public List<TreeViewDto>? Children { get; set; }
|
}
|