using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace 智慧物流软件系统
{
    /// <summary>
    /// 认证项
    /// </summary>
    public enum AuthEnum
    {
        //主页 = 1000,
        物料入库 = 2000,
        出库单据 = 3000,
        物料出库 = 4000,
        盘点单据 = 5000,
        物料盘点 = 6000,
        库存查询 = 7000,
        出入记录 = 8000,
        库位管理 = 9000,
        物料维护 = 10000,
        物料明细 = 11000,
        接口记录 = 12000,
        权限 = 13000,
        调试 = 14000,
        设置 = 15000,
    }

    public class EnumTreeAttribute : Attribute
    {
        public EnumTreeAttribute() { }

        public EnumTreeAttribute(AuthEnum parent)
        {
            Parent = parent;
        }

        public EnumTreeAttribute(AuthEnum[] childs)
        {
            Childs = childs;
        }

        public EnumTreeAttribute(AuthEnum parent, AuthEnum[] childs)
        {
            Parent = parent;
            Childs = childs;
        }

        /// <summary>
        /// 父级
        /// </summary>
        public AuthEnum? Parent { get; set; } = null;
        /// <summary>
        /// 子级
        /// </summary>
        public AuthEnum[]? Childs { get; set; } = null;
    }
}
