using BPA.SAAS.Manage.Comm.Enum;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.System.Dtos
{
    public class MenuTreeDtoOutput
    {
        public string Id { get; set; }
        /// <summary>
        /// 父Id
        /// </summary>
        public string Pid { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 编码
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// 路径
        /// </summary>
        public string Router { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public CommonStatus Status { get; set; }
        /// <summary>
        /// 图标
        /// </summary>
        public string Icon { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateAt { get; set; }
        /// <summary>
        /// 排序号
        /// </summary>
        public int Sort { get; set; }
        /// <summary>
        /// 组件
        /// </summary>
        public string Component { get; set; }
        public string Type { get; set; }
        public string TypeName { get; set; }
        public int IsAdmin{ get; set; }

        private List<MenuTreeDtoOutput> _Children;
        public List<MenuTreeDtoOutput> Children
        {
            get { return _Children; }
            set
            {
                _Children = value.Count == 0 ? null : value;
            }
        }
    }
}
