lab2
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
2026-10-16 05:27:13 +03:00
parent 65003b6119
commit 50b30b4b47
46 changed files with 6221 additions and 14 deletions
+25
View File
@@ -0,0 +1,25 @@
#pragma once
#include "db.hpp"
#include "models.hpp"
#include <optional>
#include <string>
#include <vector>
class MessageRepo {
public:
explicit MessageRepo(PgPool& pool) : pool_(pool) {}
std::optional<Message> create(const std::string& chat_id,
const std::string& sender_id,
const std::string& text);
std::optional<MessagePage> list_page(
const std::string& chat_id,
int limit,
const std::optional<std::string>& cursor);
private:
PgPool& pool_;
};