Add entities w/out logic

This commit is contained in:
Andrew 2020-09-10 00:43:40 +07:00
parent 1bda2c4047
commit 415ede2b91
11 changed files with 153 additions and 8 deletions

14
userentity.cpp Normal file
View file

@ -0,0 +1,14 @@
#include "userentity.h"
UserEntity::UserEntity(QString login, QString password, UserEntity::UserRoleEnum role)
{
this->_login = login;
this->_password_hash = 0;
for (auto pchar : password) {
this->_password_hash += pchar.unicode();
}
this->_password_hash %= (1 << 16);
this->_role = role;
}