Add meta table to DB

This commit is contained in:
Kamil
2020-12-06 20:29:48 +01:00
committed by Gent S
parent a12faac0e2
commit 7aef973ef1
2 changed files with 118 additions and 19 deletions

View File

@@ -3,9 +3,11 @@
#include "Player.hpp"
#include <string>
#include <vector>
#include <map>
#define DATABASE_VERSION 1
namespace Database {
#pragma region DatabaseStructs
struct Account {
int AccountID;
@@ -13,11 +15,6 @@ namespace Database {
int Selected;
time_t BannedUntil;
};
struct Buddyship {
int PlayerAId;
int PlayerBId;
int16_t Status;
};
struct EmailData {
int PlayerId;
int MsgIndex;
@@ -32,21 +29,11 @@ namespace Database {
uint64_t SendTime;
uint64_t DeleteTime;
};
struct EmailItem {
int PlayerId;
int MsgIndex;
int Slot;
int16_t Type;
int16_t Id;
int32_t Opt;
int32_t TimeLimit;
};
#pragma endregion DatabaseStructs
void open();
void close();
void checkMetaTable();
void createMetaTable();
void createTables();
int getTableSize(std::string tableName);