forked from mtusi2026/mtusi2026lab4
lab4
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "db.hpp"
|
||||
#include "models.hpp"
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class ChatRepo {
|
||||
public:
|
||||
explicit ChatRepo(PgPool& pool) : pool_(pool) {}
|
||||
|
||||
std::optional<Chat> create(const std::string& title,
|
||||
const std::vector<std::string>& member_ids);
|
||||
|
||||
std::optional<Chat> find_by_id(const std::string& id);
|
||||
|
||||
std::optional<ChatPage> list_for_user(const std::string& user_id, int limit, const std::optional<std::string>& cursor);
|
||||
|
||||
private:
|
||||
PgPool& pool_;
|
||||
};
|
||||
Reference in New Issue
Block a user