diff options
Diffstat (limited to 'qt/employee.hxx')
-rw-r--r-- | qt/employee.hxx | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/qt/employee.hxx b/qt/employee.hxx index f2c34da..82bbcfb 100644 --- a/qt/employee.hxx +++ b/qt/employee.hxx @@ -6,6 +6,7 @@ #include <QtCore/QString> #include <QtCore/QByteArray> +#include <QtCore/QUuid> #include <QtCore/QDateTime> #include <QtCore/QSharedPointer> #include <QtCore/QList> @@ -72,7 +73,8 @@ public: const QDate& born, const QByteArray& publicKey, QSharedPointer<Employer> employer) - : first_ (first), + : id_ (QUuid::createUuid ()), + first_ (first), last_ (last), born_ (born), publicKey_ (publicKey), @@ -80,6 +82,14 @@ public: { } + // Id. + // + const QUuid& + id () const + { + return id_; + } + // Name. // const QString& @@ -141,8 +151,8 @@ private: Employee () {} - #pragma db id auto - unsigned long id_; + #pragma db id + QUuid id_; QString first_; QString last_; |