changes which have to be don

This commit is contained in:
Ondřej Fischer 2019-11-14 15:16:23 +01:00
parent c96832f4b8
commit 6d73a9c712
4 changed files with 21 additions and 2 deletions

View File

@ -18,6 +18,19 @@
class TokenTable : public serversdk::DatabaseTable { class TokenTable : public serversdk::DatabaseTable {
Q_OBJECT 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 class DatabaseAPI : public QObject

View File

@ -6,7 +6,7 @@
#include <QDebug> #include <QDebug>
#include <memory> #include <memory>
// NOTE: it will be no longer useful
class Entity : public QObject { class Entity : public QObject {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -7,8 +7,10 @@
#include <QPointer> #include <QPointer>
#include <QPair> #include <QPair>
class Subject : public Entity {
// TODO: make it inherited from serversdk::databaseTable
class Subject : public Entity {
// TODO: add all properties
public: public:
using Entity::Entity; using Entity::Entity;
Subject() = default; Subject() = default;

View File

@ -7,7 +7,11 @@
#include <QDebug> #include <QDebug>
#include <QDateTime> #include <QDateTime>
// TODO: make it inherited from serversdk::databaseTable
class Token : public Entity { class Token : public Entity {
// TODO: add all properties
public: public:
// using Entity::Entity; // using Entity::Entity;