From 6d73a9c712454c9828a6067234d28e971cc2324c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Fischer?= Date: Thu, 14 Nov 2019 15:16:23 +0100 Subject: [PATCH] changes which have to be don --- src/colnod/databaseapi.h | 13 +++++++++++++ src/colnod/entity.h | 2 +- src/colnod/subject.h | 4 +++- src/colnod/token.h | 4 ++++ 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/colnod/databaseapi.h b/src/colnod/databaseapi.h index 4f5b008..3e2da81 100644 --- a/src/colnod/databaseapi.h +++ b/src/colnod/databaseapi.h @@ -18,6 +18,19 @@ class TokenTable : public serversdk::DatabaseTable { Q_OBJECT + TABLE_PROPERTY(QUuid, id, setId, QUuid()) + TABLE_PROPERTY(int, authErorrs, setAuthErrors, 255) + TABLE_PROPERTY(QString, description, setDescription, "") + TABLE_PROPERTY(bool, enabled, setEnabled, true) + TABLE_PROPERTY(QDateTime, lastUpdate, setLastUpdate, QDateTime()) + TABLE_PROPERTY(QString, name, setName, "") + TABLE_PROPERTY(bool, noValidity, setNoValidity, true) + TABLE_PROPERTY(int, timeToLive, setTimeToLive, 255) + TABLE_PROPERTY(int, tokenBits, setTokenBits, 32) + TABLE_PROPERTY(QString, tokenType, setTokenType, "Token") + TABLE_PROPERTY(QUuid, subjectId, setSubjectId, QUuid()) + TABLE_PROPERTY(QDateTime, lastModified, setLastModified, QDateTime()) + TABLE_PROPERTY(bool, deleted, setDeleted, false) }; class DatabaseAPI : public QObject diff --git a/src/colnod/entity.h b/src/colnod/entity.h index 55fd790..9654e55 100644 --- a/src/colnod/entity.h +++ b/src/colnod/entity.h @@ -6,7 +6,7 @@ #include #include - +// NOTE: it will be no longer useful class Entity : public QObject { Q_OBJECT public: diff --git a/src/colnod/subject.h b/src/colnod/subject.h index d7e6367..5a63167 100644 --- a/src/colnod/subject.h +++ b/src/colnod/subject.h @@ -7,8 +7,10 @@ #include #include -class Subject : public Entity { +// TODO: make it inherited from serversdk::databaseTable +class Subject : public Entity { +// TODO: add all properties public: using Entity::Entity; Subject() = default; diff --git a/src/colnod/token.h b/src/colnod/token.h index 96dea66..64b8bec 100644 --- a/src/colnod/token.h +++ b/src/colnod/token.h @@ -7,7 +7,11 @@ #include #include + +// TODO: make it inherited from serversdk::databaseTable class Token : public Entity { + + // TODO: add all properties public: // using Entity::Entity;