mirror of
https://gitlab.com/spaceti-app/integrations/acs/colnod-connector.git
synced 2026-07-12 14:10:40 +02:00
49 lines
1009 B
C++
49 lines
1009 B
C++
#pragma once
|
|
|
|
#include <QtCore/QObject>
|
|
#include <QtCore/QUuid>
|
|
#include <QtCore/QJsonObject>
|
|
#include <QDebug>
|
|
#include <memory>
|
|
|
|
|
|
class Entity : public QObject {
|
|
Q_OBJECT
|
|
public:
|
|
explicit Entity() = default;
|
|
using QObject::QObject;
|
|
|
|
const QUuid &getId() const;
|
|
void setId(const QUuid &id);
|
|
|
|
const QString &getName() const;
|
|
void setName(const QString &name);
|
|
|
|
const QString &getDescription() const;
|
|
void setDescription(const QString &description);
|
|
|
|
qint64 getLastUpdate() const;
|
|
void setLastUpdate(qint64 lastUpdate);
|
|
|
|
qint64 getLastModified() const;
|
|
void setLastModified(const qint64 &lastModified);
|
|
|
|
bool getDeleted() const;
|
|
void setDeleted(const bool &deleted);
|
|
|
|
QString idToStringWithoutBraces() const;
|
|
|
|
virtual void fromJSON(const QJsonObject &json);
|
|
virtual QJsonObject toJSON() const;
|
|
|
|
|
|
|
|
private:
|
|
QUuid id;
|
|
QString name;
|
|
QString description;
|
|
qint64 lastUpdate{};
|
|
qint64 lastModified{};
|
|
bool deleted{};
|
|
};
|