using Nirvana.Common;
using Nirvana.Common.ApiBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YBDevice.Application.SystemInfo;
using YBDevice.Entity;

namespace YBDevice.Application
{
    /// <summary>
    /// 系统管理
    /// </summary>
    public interface ISystemService
    {
        /// <summary>
        /// 获取菜单按钮列表
        /// </summary>
        /// <returns></returns>
        Task<PageParms<MenuActionS2SDto>> GetActionListAsync(QueryParams param);
        /// <summary>
        /// 角色菜单修改
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<ResultInfo> SubmitMenuActionAsync(YB_nMenuAction data);
        /// <summary>
        /// 删除菜单按钮
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ResultInfo> DeleteMenuActionAsync(Guid id);
        /// <summary>
        /// 菜单按钮详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<YB_nMenuAction> GetActionDetailAsync(Guid id);

        /// <summary>
        /// 获取菜单列表
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        Task<List<YB_nMenu>> GetMenuListAsync(Guid roleId);

        /// <summary>
        /// 菜单列表
        /// </summary>
        /// <returns></returns>
        Task<List<YB_nMenu>> GetMenuListAsync();

        /// <summary>
        /// 删除菜单
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ResultInfo> DeleteMenuAsync(Guid id);
        /// <summary>
        /// 菜单编辑
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<ResultInfo> SubmitMenuFormAsync(YB_nMenu model);
        /// <summary>
        /// 详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<YB_nMenu> DetailMenuAsync(Guid id);
        /// <summary>
        /// 角色列表
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        Task<PageParms<YB_nRole>> GetRoleListAsync(QueryParams param);
        /// <summary>
        /// 角色信息修改
        /// </summary>
        /// <param name="role"></param>
        /// <returns></returns>
        Task<ResultInfo> SubmitRoleFormAsync(RoleSubmitModel role);
        /// <summary>
        /// 获取所有角色
        /// </summary>
        /// <param name="keyword"></param>
        /// <returns></returns>
        Task<List<YB_nRole>> GetAllRoleListAsync(string keyword = "");
        /// <summary>
        /// 获取指定角色菜单列表
        /// </summary>
        /// <param name="keyValue"></param>
        /// <returns></returns>
        Task<RoleSubmitModel> GetFromJsonAsync(Guid keyValue);
        /// <summary>
        /// 删除角色
        /// </summary>
        /// <param name="keyValue"></param>
        /// <returns></returns>
        Task<ResultInfo> DeleteRoleFormAsync(Guid keyValue);
        /// <summary>
        /// 角色详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<RoleSubmitModel> DetailRoleAsync(Guid id);
        /// <summary>
        /// 角色的菜单按钮列表
        /// </summary>
        /// <param name="id">角色ID</param>
        /// <returns></returns>
        Task<List<MenuActionListS2CDto>> GetMenuActionListAsync(Guid? id);
    }
}
