Abstraction and serialization for entities

This commit is contained in:
Andrew nuark G 2020-12-15 20:17:46 +07:00
parent 5cb96fb793
commit 48ad2f1817
13 changed files with 106 additions and 12 deletions

View file

@ -1,6 +1,8 @@
#ifndef USER_ENTITY_H
#define USER_ENTITY_H
#include "IEntity.h"
#include <QString>
#include <QCryptographicHash>
@ -10,8 +12,7 @@ enum class UserRole {
};
class user_entity
{
class user_entity : public IEntity {
private:
unsigned long long _id;
QString _login;
@ -26,6 +27,9 @@ public:
const QString login();
UserRole role();
bool verify_password(const QString &password);
void serialize(QDataStream &output);
void deserialize(QDataStream &input);
};
#endif // USER_ENTITY_H