forked from CPP-Final-Project/Chat_Server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RoomRepository.h
35 lines (24 loc) · 849 Bytes
/
RoomRepository.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef ROOMREPOSITORY_H
#define ROOMREPOSITORY_H
#include "DBConncetion_Service.h"
#include "QueryHelper.h"
#include <QtConcurrent>
#include <plog/Log.h>
namespace DBService {
class RoomRepository : public QObject {
Q_OBJECT
private:
static DBConnection_Service a_dbConnection;
public:
RoomRepository(const QString& connection_string_);
~RoomRepository();
static QFuture<QList<QSharedPointer<DBEntity::DBRoom>>> getAllRooms();
static QList<QSharedPointer<DBEntity::DBRoom>> getAllActiveRooms();
static QFuture<QSharedPointer<DBEntity::DBRoom>> getRoomById(const qint32& room_id_);
static qint32 createRoom(const DBEntity::DBRoom& room_);
static QFuture<bool> deleteRoom(const qint32& id_);
static qint32 getTopicIdByTopicName(const QString& topic_name_);
};
}
Q_DECLARE_METATYPE(DBService::RoomRepository)
#endif