Abstraction and serialization for entities
This commit is contained in:
parent
5cb96fb793
commit
48ad2f1817
13 changed files with 106 additions and 12 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue