using System.Collections.Generic;
using System.Threading.Tasks;
using GxPress.Request.Menu;
using GxPress.Request.Role;
using GxPress.Result.SystemRole;

namespace GxPress.Service.Interface.Role
{
    public interface IRoleService : IService
    {
        /// <summary>
        /// 添加权限菜单关联
        /// </summary>
        /// <param name="models"></param>
        /// <returns></returns>
        Task<bool> InsertSystemRoleMenusAsync(SystemRoleMenusInRequest models);

        /// <summary>
        /// 添加权限
        /// </summary>
        /// <param name="models"></param>
        /// <returns></returns>
        Task<bool> InsertSystemRoleAsync(RoleInRequest request);
        /// <summary>
        /// 修改权限
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<bool> UpdateSystemRoleAsync(RoleInRequest request);
        /// <summary>
        /// 删除权限
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<bool> DeleteSystemRoleAsync(int id);
        /// <summary>
        /// 添加菜单
        /// </summary>
        /// <param name="models"></param>
        /// <returns></returns>
        Task<bool> InsertMenusAsync(Entity.Menus.Menus model);

        Task<bool> InsertMenusAsync(List<MenuInRequest> models);
        /// <summary>
        /// 修改菜单
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<bool> UpdateMenusAsync(Entity.Menus.Menus model);
        /// <summary>
        /// 删除菜单
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<bool> DeleteMenusAsync(int id);
        /// <summary>
        /// 根据权限ID获取菜单
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        Task<List<MenuInResult>> GetMenusAllAsync(int roleId);

        /// <summary>
        /// 获取所有菜单
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        Task<IEnumerable<Entity.Menus.Menus>> GetMenusAllAsync();
        /// <summary>
        /// 获取所有权限
        /// </summary>
        /// <returns></returns>
        Task<List<SystemRoleResult>> GetSystemRoleAllAsync();
    }
}