#ifndef SERVICELOADDB_H #define SERVICELOADDB_H #include #include #include #include #include #include #include #include #include #include #include #include #include "models/types.h" // IWYU pragma: keep class ServiceLoadDB : public QObject { Q_OBJECT public: explicit ServiceLoadDB(QObject *parent = nullptr); void start(); QMap loadLocations(); QMap loadDepartments(); QMap loadManufacturers(); QMap loadDeviceTypes(); QMap loadDeviceModels(); QMap loadDevices(); bool updateDevice(const Device &device); private: QList readStructureElements(int modelId); private: QSqlDatabase db; QString db_input; QSqlQuery query; QMap mapDeviceModels; }; #endif // SERVICELOADDB_H