using System.Collections.Generic;
using YGNT.Infrastructure.Helper;

namespace YGNT.Infrastructure.Model
{
    public class BaseTreeDto<T> : ITreeNode<T> where T : ITreeNode<T>
    {
        public BaseTreeDto()
        {
            Children = new List<T>();
        }

        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 主键Id
        /// </summary>
        public string Id { get; set; }
        /// <summary>
        /// 父Id
        /// </summary>
        public string Pid { get; set; }
        /// <summary>
        /// 子节点
        /// </summary>
        public List<T> Children { get; set; }
    }

    public class BaseTreeDto : ITreeNode<BaseTreeDto>
    {
        public BaseTreeDto()
        {
            Children = new List<BaseTreeDto>();
        }
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 主键Id
        /// </summary>
        public string Id { get; set; }
        /// <summary>
        /// 父Id
        /// </summary>
        public string Pid { get; set; }
        /// <summary>
        /// 子节点
        /// </summary>
        public List<BaseTreeDto> Children { get; set; }
    }
}