1
0
forked from BRT/arc
arc/database/dao/GeneralLogDAO.h
trnsmkot 292f8b78cf - Add database migration for screenshot column in general_logs.
- Implement `cleanupOldData` in `DatabaseManager` to remove outdated entries and optimize storage.
- Introduce `unlockScreen` in `AdbUtils` and integrate it into common scripts for screen unlocking.
- Enhance `GeneralLogDAO` to support screenshot storage and retrieval.
- Expand `FileLogWindow` with screenshot viewer and horizontal layout.
- Add device ID migration logic in `BankProfileDAO` and `MaterialDAO`.
- Improve error handling in `EventHandler` by saving and logging screenshots for critical events.
2026-03-31 13:08:02 +07:00

26 lines
787 B
C++

#pragma once
#include <QList>
#include <QString>
#include <QStringList>
#include <QDateTime>
struct GeneralLogEntry {
int id = -1;
QString level;
QString source;
QString message;
QDateTime timestamp;
QByteArray screenshot;
};
class GeneralLogDAO {
public:
static bool insert(const QString &level, const QString &source, const QString &message);
static bool insert(const QString &level, const QString &source, const QString &message,
const QByteArray &screenshot);
[[nodiscard]] static QList<GeneralLogEntry> getLogs(int page, int pageSize,
const QStringList &levels = {});
[[nodiscard]] static int getTotalCount(const QStringList &levels = {});
};