2016-05-12 14:08:58 +08:00
|
|
|
#ifndef TDATABASE_H
|
|
|
|
|
#define TDATABASE_H
|
|
|
|
|
|
|
|
|
|
#include "database.h"
|
|
|
|
|
|
2017-02-01 18:01:21 +08:00
|
|
|
#ifdef NUT_NAMESPACE
|
|
|
|
|
using namespace NUT_NAMESPACE;
|
|
|
|
|
#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
|
|
|
|
|
|
|
|
NUT_DECLARE_TABLE(Post, post)
|
|
|
|
|
NUT_DECLARE_TABLE(Comment, comment)
|
2018-01-09 00:59:16 +08:00
|
|
|
NUT_DECLARE_TABLE(User, user)
|
2018-01-14 22:03:24 +08:00
|
|
|
NUT_DECLARE_TABLE(Score, score)
|
2016-05-12 14:08:58 +08:00
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
WeblogDatabase();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // TDATABASE_H
|