Refactor project structure: replace User class with ChatUser, integrate Database class, and update CMake configuration for new files

This commit is contained in:
Torsten Schulz (local)
2025-08-11 14:48:45 +02:00
parent 89956bd01a
commit b81f2de10f
14 changed files with 644 additions and 44 deletions

23
database.h Normal file
View File

@@ -0,0 +1,23 @@
#ifndef YC_LIB_DATABASE_H
#define YC_LIB_DATABASE_H
#include <memory>
#include <pqxx/pqxx>
#include "config.h"
namespace Yc {
namespace Lib {
class Database {
public:
Database(std::shared_ptr<Config> config);
~Database() = default;
pqxx::result exec(const std::string& query);
private:
std::unique_ptr<pqxx::connection> _connection;
};
} // namespace Lib
} // namespace Yc
#endif // YC_LIB_DATABASE_H