mirror of
https://github.com/latentPrion/cppbessot.git
synced 2026-04-17 18:44:23 +00:00
46 lines
857 B
C++
46 lines
857 B
C++
/*
|
|
* AUTO-GENERATED BY CppBeSsot.
|
|
* Direct edits are pointless: this file is regenerated.
|
|
* Update the OpenAPI schema and/or CppBeSsot templates, then regenerate generated-* outputs.
|
|
*/
|
|
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
|
|
#include <nlohmann/json.hpp>
|
|
#include <odb/core.hxx>
|
|
|
|
namespace models {
|
|
|
|
#pragma db model version(1, 1)
|
|
#pragma db object table("Agent")
|
|
class Agent
|
|
{
|
|
public:
|
|
#pragma db id
|
|
// odbAddedIn: 1.1
|
|
std::string id{};
|
|
// odbAddedIn: 1.1
|
|
std::string role{};
|
|
// odbAddedIn: 1.1
|
|
bool persistent{};
|
|
// odbAddedIn: 1.1
|
|
std::string displayName{};
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(Agent, id, role, persistent, displayName)
|
|
|
|
nlohmann::json toJson() const
|
|
{
|
|
return nlohmann::json(*this);
|
|
}
|
|
|
|
static Agent fromJson(const nlohmann::json& j)
|
|
{
|
|
return j.get<Agent>();
|
|
}
|
|
};
|
|
|
|
} // namespace models
|
|
|