PNP_PIbd-31_Rodionov_I_A_Co.../models/baseentity.h
2025-01-14 21:33:47 +04:00

22 lines
311 B
C++

#ifndef BASEENTITY_H
#define BASEENTITY_H
#include <QJsonObject>
class BaseEntity
{
public:
BaseEntity();
int id() const;
void setId(int newId);
virtual void fromJson(const QJsonObject &) = 0;
virtual QJsonObject toJson() const = 0;
private:
int _id = 0;
};
#endif // BASEENTITY_H