(精华)2020年6月26日 C#类库model TreeModel

using System.Collections.Generic;

namespace Coldairarrow.Util
{
    /// <summary>
    /// 树模型(可以作为父类)
    /// </summary>
    public class TreeModel
    {
        /// <summary>
        /// 唯一标识Id
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 数据值
        /// </summary>
        public string Value { get; set; }

        /// <summary>
        /// 父Id
        /// </summary>
        public string ParentId { get; set; }

        /// <summary>
        /// 节点深度
        /// </summary>
        public int? Level { get; set; } = 1;

        /// <summary>
        /// 显示的内容
        /// </summary>
        public string Text { get; set; }

        /// <summary>
        /// 孩子节点
        /// </summary>
        public List<object> Children { get; set; } 
    }
}

猜你喜欢

转载自blog.csdn.net/aa2528877987/article/details/106971278