#ifndef RESTSMODEL_H #define RESTSMODEL_H #include "models/basemodel.h" class RestsModel : public BaseModel { public: explicit RestsModel(QObject *parent = nullptr); float productRest(const QString &storeId, const QString &productId); void submitRest(const QString &storeId, const QString &productId, float rest); private: QVariantMap findRest(const QString &storeId, const QString &productId); void loadCache(); void clearCache(); using Key = QPair; QMap m_rests; }; #endif // RESTSMODEL_H