Nut/tests/auto/common/weblogdatabase.h

38 lines
618 B
C
Raw Normal View History

2016-05-12 14:08:58 +08:00
#ifndef TDATABASE_H
#define TDATABASE_H
2020-07-31 00:13:57 +08:00
#include <QtNut/database.h>
2016-05-12 14:08:58 +08:00
2017-02-01 18:01:21 +08:00
#ifdef NUT_NAMESPACE
using namespace NUT_NAMESPACE;
#endif
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
Q_MOC_INCLUDE("user.h")
Q_MOC_INCLUDE("post.h")
Q_MOC_INCLUDE("score.h")
Q_MOC_INCLUDE("comment.h")
#endif
2016-05-12 14:08:58 +08:00
class Post;
class Comment;
2018-01-09 00:59:16 +08:00
class User;
2018-01-14 22:03:24 +08:00
class Score;
2016-05-12 14:08:58 +08:00
class WeblogDatabase : public Database
{
Q_OBJECT
2018-01-09 00:59:16 +08:00
NUT_DB_VERSION(1)
2016-05-12 14:08:58 +08:00
2018-09-05 13:18:59 +08:00
NUT_DECLARE_TABLE(Post, posts)
NUT_DECLARE_TABLE(Comment, comments)
NUT_DECLARE_TABLE(User, users)
NUT_DECLARE_TABLE(Score, scores)
2016-05-12 14:08:58 +08:00
public:
WeblogDatabase();
};
#endif // TDATABASE_H