| 1234567891011121314151617181920212223 |
- #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<QString, QString>;
- QMap<Key, QVariantMap> m_rests;
- };
- #endif // RESTSMODEL_H
|