TreeFrogFramework  1.18
tsessionmongoobject.h
Go to the documentation of this file.
1 #ifndef TSESSIONMONGOOBJECT_H
2 #define TSESSIONMONGOOBJECT_H
3 
4 #include <TMongoObject>
5 
6 
7 class T_MODEL_EXPORT TSessionMongoObject : public TMongoObject
8 {
9 public:
10  QString _id;
11  QString sessionId;
12  QByteArray data;
13  QDateTime updatedAt;
14 
16  Id = 0,
20  };
21 
22  virtual QString collectionName() const override { return QLatin1String("session"); }
23  virtual QString objectId() const override { return _id; }
24  virtual QString &objectId() override { return _id; }
25 
26 private:
27  Q_OBJECT
28  Q_PROPERTY(QString _id READ get_id WRITE set_id)
29  T_DEFINE_PROPERTY(QString, _id)
30  Q_PROPERTY(QString sessionId READ getsessionId WRITE setsessionId)
31  T_DEFINE_PROPERTY(QString, sessionId)
32  Q_PROPERTY(QByteArray data READ getdata WRITE setdata)
33  T_DEFINE_PROPERTY(QByteArray, data)
34  Q_PROPERTY(QDateTime updatedAt READ getupdatedAt WRITE setupdatedAt)
35  T_DEFINE_PROPERTY(QDateTime, updatedAt)
36 };
37 
38 #endif // TSESSIONMONGOOBJECT_H
QString _id
Definition: tsessionmongoobject.h:10
virtual QString objectId() const override
Definition: tsessionmongoobject.h:23
#define T_DEFINE_PROPERTY(TYPE, PROPERTY)
Definition: tglobal.h:52
Definition: tsessionmongoobject.h:17
QDateTime updatedAt
Definition: tsessionmongoobject.h:13
Definition: tsessionmongoobject.h:19
Definition: tsessionmongoobject.h:18
virtual QString collectionName() const override
Definition: tsessionmongoobject.h:22
Definition: tsessionmongoobject.h:7
#define T_MODEL_EXPORT
Definition: tglobal.h:82
virtual QString & objectId() override
Definition: tsessionmongoobject.h:24
QByteArray data
Definition: tsessionmongoobject.h:12
QString sessionId
Definition: tsessionmongoobject.h:11
PropertyIndex
Definition: tsessionmongoobject.h:15