Add delivery point entity

This commit is contained in:
Andrew nuark G 2020-12-15 16:40:45 +07:00
parent ecd5d3ae4e
commit b1333c74a5
3 changed files with 48 additions and 0 deletions

View file

@ -0,0 +1,21 @@
#include "dpoint_entity.h"
dpoint_entity::dpoint_entity(const QString &title) : _title(title) {
this->_id = 0;
auto hash = QCryptographicHash::hash(title.toLocal8Bit(), QCryptographicHash::Md5);
for (auto bit : hash) {
this->_id += bit;
}
}
unsigned long long dpoint_entity::id() {
return this->_id;
}
QString dpoint_entity::title() {
return this->_title;
}
const QVector<unsigned long long> dpoint_entity::storages_ids() {
return this->_storages_ids;
}