using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

using BookShopOnline.Model;

namespace BookShopOnline.IDal
{
    public interface IUser
    {
        int InsertUser(User user);

        /// <summary>
        /// 存在返回true，否则返回false
        /// </summary>
        /// <param name="userName"></param>
        /// <returns></returns>
        bool CheckUserName(string userName);

        /// <summary>
        /// 存在返回true，否则返回false
        /// </summary>
        /// <param name="email"></param>
        /// <returns></returns>
        bool CheckEmail(string email);

        User CheckUserLogin(string userName, string userPwd, Role role);

        bool EditPwd(int userID, string newPwd);

        int UpdateUser(User user);
    }
}
