#ifndef BOOKREPOSITORY_H #define BOOKREPOSITORY_H #include "repository_global.h" #include #include #include namespace repository { class REPOSITORY_EXPORT BookRepository { public: BookRepository(odb::core::database& db); // Получить все книги QVector findAll(); // Найти книгу по ID Book_S findById(int id); // Сохранить книгу (создать или обновить) // void save(const Book_S& book); // Удалить книгу void remove(int id); // Найти книги по автору QVector findByAuthor(const QString& author); private: odb::core::database& m_db; }; } // namespace repository #endif // BOOKREPOSITORY_H