using System;
using YBEE.EQM.Core;

namespace YBEE.EQM.Application
{
    /// <summary>
    /// 菜单参数
    /// </summary>
    public class SysMenuInput
    {
        /// <summary>
        /// 菜单类型（字典 1目录 2菜单 3按钮）
        /// </summary>
        [Required]
        public MenuType MenuType { get; set; }

        /// <summary>
        /// 路由地址
        /// </summary>
        public string Router { get; set; }

        /// <summary>
        /// 权限标识
        /// </summary>
        public string Permission { get; set; }

        /// <summary>
        /// 打开方式（字典 0无 1组件 2内链 3外链）
        /// </summary>
        public MenuOpenType OpenType { get; set; }
    }

    /// <summary>
    /// 新增菜单参数
    /// </summary>
    public class AddSysMenuInput
    {
        /// <summary>
        /// 菜单类型（字典 1目录 2菜单 3按钮）
        /// </summary>
        [Required(ErrorMessage = "菜单类型不能为空")]
        public MenuType Type { get; set; }

        /// <summary>
        /// 父Id
        /// </summary>
        public int Pid { get; set; }

        /// <summary>
        /// 菜单类型（字典 1目录 2菜单 3按钮）
        /// </summary>
        [Required]
        public MenuType MenuType { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 图标
        /// </summary>
        public string Icon { get; set; }

        /// <summary>
        /// 路由地址
        /// </summary>
        public string Router { get; set; }

        /// <summary>
        /// 组件地址
        /// </summary>
        public string Component { get; set; }

        /// <summary>
        /// 权限标识
        /// </summary>
        public string Permission { get; set; }

        /// <summary>
        /// 打开方式（字典 0无 1组件 2内链 3外链）
        /// </summary>
        public MenuOpenType OpenType { get; set; }

        /// <summary>
        /// 是否可见
        /// </summary>
        public bool Visible { get; set; }

        /// <summary>
        /// 内链地址
        /// </summary>
        public string Link { get; set; }

        /// <summary>
        /// 重定向地址
        /// </summary>
        public string Redirect { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
    }

    /// <summary>
    /// 更新菜单参数
    /// </summary>
    public class UpdateSysMenuInput
    {
        /// <summary>
        /// 菜单Id
        /// </summary>
        [Required(ErrorMessage = "菜单Id不能为空")]
        public int Id { get; set; }

        /// <summary>
        /// 父Id
        /// </summary>DeleteMenuInput
        [Required(ErrorMessage = "父级菜单Id不能为空")]
        public int Pid { get; set; }

        /// <summary>
        /// 菜单类型（字典 1目录 2菜单 3按钮）
        /// </summary>
        [Required(ErrorMessage = "菜单类型不能为空")]
        public MenuType MenuType { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 图标
        /// </summary>
        public string Icon { get; set; }

        /// <summary>
        /// 路由地址
        /// </summary>
        public string Router { get; set; }

        /// <summary>
        /// 组件地址
        /// </summary>
        public string Component { get; set; }

        /// <summary>
        /// 权限标识
        /// </summary>
        public string Permission { get; set; }

        /// <summary>
        /// 打开方式（字典 0无 1组件 2内链 3外链）
        /// </summary>
        public MenuOpenType OpenType { get; set; }

        /// <summary>
        /// 是否可见
        /// </summary>
        public bool Visible { get; set; }

        /// <summary>
        /// 内链地址
        /// </summary>
        public string Link { get; set; }

        /// <summary>
        /// 重定向地址
        /// </summary>
        public string Redirect { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
    }

    /// <summary>
    /// 删除菜单参数
    /// </summary>
    public class DeleteSysMenuInput : BaseId
    {
    }
}