api basic routes

This commit is contained in:
2026-03-13 02:51:44 +00:00
parent 1333de2b37
commit 767f1d8382
11 changed files with 173 additions and 46 deletions

View File

@@ -1,7 +1,7 @@
#ifndef DATABASE_HPP
#define DATABASE_HPP
#include "types.hpp"
#include "timestamp.hpp"
#include "utils.hpp"
#include <chrono>
#include <optional>
@@ -28,10 +28,11 @@ public:
void CreateAccessToken(User& user);
void DeleteAccessToken(const User& user);
User ValidateAccessToken(const std::string& token);
void StartFront(const User& user, const Member& member, const std::string& note = "", Timestamp start_time = std::chrono::system_clock::now());
void EndFront(const User& user, const Member& member, Timestamp end_time = std::chrono::system_clock::now());
std::vector<Front> GetFronts(const User& user, Timestamp start_time, std::optional<Timestamp> end_time = std::nullopt);
void StartFront(const User& user, const Member& member, const std::string& note = "", timestamp::Timestamp start_time = timestamp::Now());
void EndFront(const User& user, const Member& member, timestamp::Timestamp end_time = timestamp::Now());
std::vector<Front> GetFronts(const User& user, timestamp::Timestamp start_time, std::optional<timestamp::Timestamp> end_time = std::nullopt);
};
#endif