Rests model was added
This commit is contained in:
23
models/restsmodel.h
Normal file
23
models/restsmodel.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user