实现登录接口。
This commit is contained in:
@ -1,17 +1,34 @@
|
||||
#ifndef __DATASTRUCTURE_H__
|
||||
#define __DATASTRUCTURE_H__
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
struct VisitorStats{
|
||||
namespace Older {
|
||||
struct VisitorStats {
|
||||
std::string url;
|
||||
int visitorCount=0;
|
||||
int totalViews =0;
|
||||
int64_t lastViewTime =0;
|
||||
int visitorCount = 0;
|
||||
int totalViews = 0;
|
||||
int64_t lastViewTime = 0;
|
||||
};
|
||||
|
||||
struct SiteStats{
|
||||
int totalViews =0;
|
||||
int totalVisitors =0;
|
||||
struct SiteStats {
|
||||
int totalViews = 0;
|
||||
int totalVisitors = 0;
|
||||
};
|
||||
|
||||
struct Account {
|
||||
int64_t id = 0;
|
||||
std::string username;
|
||||
std::string email;
|
||||
std::vector<uint8_t> passwordHash;
|
||||
std::vector<uint8_t> salt;
|
||||
int64_t createdAt = 0;
|
||||
|
||||
static Account hashPassword(const std::string &password);
|
||||
static bool verifyPassword(const Account &account, const std::string &password);
|
||||
static bool validateEmail(const std::string& email);
|
||||
};}
|
||||
|
||||
#endif // __DATASTRUCTURE_H__
|
Reference in New Issue
Block a user