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,
        PDA物料绑定 = 12000,
        PDA绑定查询 = 13000,
        PDA产线呼叫 = 14000,
        PDA货架送回 = 15000,
        PDA库存盘点 = 16000,
        PDA任务管理 = 17000,
        PDA货架位置绑定解绑 = 18000,
    }

    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;
    }
}
