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;