package cn.reghao.tnb.auth.api.iface;

import cn.reghao.tnb.auth.api.dto.AccountAvatar;
import cn.reghao.tnb.auth.api.dto.AccountInfo;
import cn.reghao.tnb.auth.api.dto.AuthedAccount;
import cn.reghao.tnb.auth.api.dto.CrawledUser;

import java.util.List;

/**
 * @author reghao
 * @date 2021-11-12 17:32:01
 */
public interface AccountQuery {
    AuthedAccount getAuthedAccount(int type, String sessId);
    AccountInfo getAccountInfo(long userId);
    AccountAvatar getAccountAvatar(long userId);
    List<AccountInfo> getAccountInfos(List<Long> userIds);
    AccountInfo getByMobile(String mobile);
    AccountInfo getByUsername(String username);
    long getByRole(String role);
    @Deprecated
    Long createCrawledAccount(CrawledUser crawledUser);
    void updateAvatar(long userId, String avatarUrl);
    String getUserIdStr(long userIdLong);
    long getUserIdLong(String userIdStr);
}
