Implemented `EventWindow` for viewing events with pagination and table-based UI. Added database migration to remove `UNIQUE` constraint on `external_id` in `events`. Enhanced DAO methods for event retrieval, pagination, and transaction updates. Integrated OCR recognition in transaction scripts and streamlined event handling in services.
27 lines
719 B
C++
27 lines
719 B
C++
#pragma once
|
|
|
|
#include <db/EventInfo.h>
|
|
|
|
class EventDAO {
|
|
public:
|
|
[[nodiscard]] static int insertEvent(const EventInfo &event);
|
|
|
|
[[nodiscard]] static bool updateEvent(
|
|
int id,
|
|
const EventStatus &status,
|
|
const QString &comment
|
|
);
|
|
|
|
[[nodiscard]] static QList<EventInfo> getAllEvents(const EventStatus &status);
|
|
|
|
[[nodiscard]] static EventInfo getFirstWaitEventByDeviceId(const QString &key);
|
|
|
|
[[nodiscard]] static bool existsActiveByExternalId(const QString &externalId);
|
|
|
|
[[nodiscard]] static bool updateEventAmount(int id, double amount);
|
|
|
|
[[nodiscard]] static QList<EventInfo> getEvents(int page, int pageSize);
|
|
|
|
[[nodiscard]] static int getTotalCount();
|
|
};
|