Add phần create map by upload
Some checks failed
Test / test (push) Has been cancelled

This commit is contained in:
2026-06-19 11:52:21 +07:00
parent 098e1b2b69
commit a6cf06d7eb
27 changed files with 4960 additions and 129 deletions

View File

@@ -0,0 +1,30 @@
#pragma once
#include <nlohmann/json.hpp>
#include <mutex>
#include <optional>
#include <string>
namespace lm {
class Database;
class SiteStore
{
public:
explicit SiteStore(Database& db);
nlohmann::json list() const;
std::optional<nlohmann::json> find(const std::string& id) const;
std::optional<nlohmann::json> create(const nlohmann::json& payload, std::string& err);
bool update(const std::string& id, const nlohmann::json& payload, std::string& err);
bool remove(const std::string& id, std::string& err);
std::string ensureDefaultSiteId();
private:
Database& db_;
mutable std::mutex mu_;
};
} // namespace lm