PNP_PIbd-31_Rodionov_I_A_Co.../models/baseentity.h

22 lines
311 B
C
Raw Normal View History

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