package common.service;

import common.model.Menu;
import common.model.User;

import java.util.List;

/**
 * Created by mxq on 2017/12/21.
 */
public interface UserService {

    Boolean validEmail(String email);

    User create(User login, User resource);

    User update(User login, User resource);

    List<User> find(User login);

    User delete(User login, Long id);

    User enable(User login, Long id);

    User forbiden(User login, Long id);

    User updateName(User login, String name);

    User updatePwd(User login, String pwd);

    User updatePwd(String email, String pwd);

    Boolean sendCode(String email);

    Boolean validCode(String email, String code, String pwd);

    List<User> findbyRole(Long role);

    List<User> findSonsAlive(Long user);

    List<User> findAllSons(Long user);
}
