forked from CPP-Final-Project/Chat_Server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDTORoom.h
More file actions
60 lines (47 loc) · 1.61 KB
/
DTORoom.h
File metadata and controls
60 lines (47 loc) · 1.61 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef DTOROOM_H
#define DTOROOM_H
#include <QString>
#include <QObject>
#include <QSharedPointer>
#include "DBRoom.h"
#include "SrvRoom.h"
namespace DTOModel {
class DTORoom : public QObject {
Q_OBJECT
public:
DTORoom(QObject* parent = nullptr);
DTORoom(const qint32& id_, const QString& name_, const QString& description_, const qint32& topic_id_, const QString& topic_name_, const bool& is_private_, const QString& password_, const bool& is_deleted_ = false);
~DTORoom();
qint32 getId() const;
void setId(const qint32& id_);
QString getName() const;
void setName(const QString& name_);
QString getDescription() const;
void setDescription(const QString& description_);
qint32 getTopicId() const;
void setTopicId(const qint32& topic_id_);
QString getTopicName() const;
void setTopicName(const QString& topic_name_);
bool isPrivate() const;
void setIsPrivate(const bool& is_private_);
QString getPassword() const;
void setPassword(const QString& password_);
bool isDeleted() const;
void setIsDeleted(const bool& is_deleted);
static QSharedPointer<DTOModel::DTORoom> createDTORoomFromSrv(const SrvRoom& srv_room);
static QSharedPointer<SrvRoom> createSrvRoomFromDTO(const DTOModel::DTORoom& dto_model);
static QSharedPointer<DBEntity::DBRoom> createDBRoomFromSrv(const SrvRoom& srv_room);
static QSharedPointer<SrvRoom> createSrvRoomFromDB(const DBEntity::DBRoom& db_room);
private:
qint32 id;
QString name;
QString description;
qint32 topic_id;
QString topic_name;
bool is_private;
QString password;
bool is_deleted;
};
}
Q_DECLARE_METATYPE(DTOModel::DTORoom)
#endif