Files
IM/MS/works/db/UserDB.h
dongl 61ff6fe46b 修改了 添加好友的代码
发现了获取验证码的bug delete sri后 无报错不发数据包
还有填写验证码 错误 session删除了
2023-06-16 20:37:27 +08:00

43 lines
1.1 KiB
C++

//
// Created by dongl on 23-4-23.
//
#ifndef IM2_USERDB_H
#define IM2_USERDB_H
#include "linkDB.h"
#include "DB.h"
#include "po/po.h"
#include <optional>
class UserDB : public DB {
/// login ...
public:
// 查询用户
std::tuple<bool, PoUser> select_user(const std::string& account, const std::string& by_field);
// 查询用户是否存在
bool select_user_exist(uint64_t account);
// 添加用户
bool insert_user(uint64_t account, const std::string &password, const std::string &password_salt,
const std::string& client_info = "");
// 插入用户好友 初始好友 自己
bool insert_user_friends(uint64_t account, uint64_t friends = 0);
// 删除用户
bool remove_user(uint64_t account);
// 号池取号
std::optional<uint64_t> fetch_account();
// 号池内删除帐号
bool remove_pool_account(uint64_t account);
// 绑定邮箱
bool bind_email(uint64_t account, const std::string& email);
// 绑定手机
bool bind_phone(uint64_t account, const std::string& phone);
};
#endif //IM2_USERDB_H