#ifndef HBLASTRECORDDAO_H #define HBLASTRECORDDAO_H #include "HBlastRecord.h" #include #include #include #include #include #include struct PaginatedHBlastRecordResult { QList> BlastRecords; int totalCount; }; class HBlastRecordDao { public: HBlastRecordDao(QSqlDatabase db); // HBlastRecord getById(qint64 id); bool deleteHBlastRecord(const HBlastRecord &record); bool updateHBlastRecord(const HBlastRecord &record); bool addHBlastRecord(const HBlastRecord &record); PaginatedHBlastRecordResult getAllHRecords(int page, int pageSize); private: QSqlDatabase database; // 将QSqlRecord转换为HBlastRecord对象 QSharedPointer recordToBlastRecord(const QSqlRecord &record); }; #endif // HBLASTRECORDDAO_H