CCash/include/user.h
2021-07-19 23:33:03 -07:00

24 lines
635 B
C++

#pragma once
#include <json/json.h> //to be removed later
#include "xxhash_str.h"
#include "bank_dom_final_models.h"
#include "log.h"
struct User
{
uint32_t balance;
XXH64_hash_t password;
#if MAX_LOG_SIZE > 0
Log log;
#endif
User(uint32_t init_bal, const std::string &init_pass) noexcept;
User(uint32_t init_bal, XXH64_hash_t init_pass) noexcept;
#if MAX_LOG_SIZE > 0
User(uint32_t init_bal, XXH64_hash_t init_pass, const Json::Value &log_j) noexcept;
#endif
User(const bank_dom::User &u) noexcept;
bank_dom::User Encode() const noexcept;
Json::Value Serialize() const; //to be removed later
};