#ifndef TRAYREPOSITORY_H #define TRAYREPOSITORY_H #include "../models/tray.h" #include class TrayRepository { public: QList listTrays(QString *error = nullptr); QList listSlots(int trayId, QString *error = nullptr); QList listEmptySlotsForAllocation(QString *error = nullptr); bool initializeSlots(int trayId, int rows = 7, int columns = 7, QString *error = nullptr); bool assignSlot(int trayId, int rowNo, int columnNo, int workpieceId, const QString &state, QString *error = nullptr); bool refreshStats(int trayId, QString *error = nullptr); bool upsertTray(const Tray &tray, QString *error = nullptr); bool updateSlotState(int trayId, int rowNo, int columnNo, const QString &state, int workpieceId = 0, QString *error = nullptr); }; #endif // TRAYREPOSITORY_H