Add entities w/out logic
This commit is contained in:
parent
1bda2c4047
commit
415ede2b91
11 changed files with 153 additions and 8 deletions
14
userentity.cpp
Normal file
14
userentity.cpp
Normal 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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue