2024-12-24 18:13:22 +04:00
|
|
|
#ifndef BASEENTITY_H
|
|
|
|
#define BASEENTITY_H
|
|
|
|
|
|
|
|
#include <QJsonObject>
|
|
|
|
|
|
|
|
class BaseEntity
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
BaseEntity();
|
|
|
|
|
|
|
|
int id() const;
|
|
|
|
void setId(int newId);
|
|
|
|
|
2025-01-14 21:33:47 +04:00
|
|
|
virtual void fromJson(const QJsonObject &) = 0;
|
2024-12-24 18:13:22 +04:00
|
|
|
virtual QJsonObject toJson() const = 0;
|
|
|
|
|
|
|
|
private:
|
|
|
|
int _id = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // BASEENTITY_H
|