using MWS.Data.Manager;
using MWS.Library.Common;
using MWS.Library.Common.Module;
using MWS.Model;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace MWS.Data.InterFace
{
    public interface IUser : IDapperHelper
    {
        Task<User> GetModelByAccount(string account);
        Task<List<User>> GetModels(string keyword, string sortingProperty = "Id", bool ascending = false);
        List<User> GetPagingModels(string keyword, out int totalCount, int pageIndex = 1, int pageSize = 20, string sortingProperty = "Id", bool ascending = false);
        Task<ResultModel> Login(string account, string password);

        int UpdatePassWord(string account, string password);
        PageData<User> GetAll(string kewWord, int pageIndex, int pageSize);
        int GetAllRecordsCount(string kewWord);
    }
}
