added logging module and a sandbox project

This commit is contained in:
Sascha Kühl
2025-07-03 16:13:58 +02:00
parent c4a00f19fd
commit 20d6a77275
29 changed files with 2287 additions and 25 deletions
+26
View File
@@ -0,0 +1,26 @@
#ifndef BOOK_HPP
#define BOOK_HPP
#include "matador/object/object_ptr.hpp"
#include "matador/utils/access.hpp"
namespace demo {
struct author;
struct book {
unsigned int id{};
matador::object::object_ptr<author> book_author;
std::string title;
unsigned short published_in{};
template<typename Operator>
void process( Operator& op ) {
namespace field = matador::access;
field::primary_key( op, "id", id );
field::attribute( op, "title", title, 511 );
field::has_one( op, "author_id", book_author, matador::utils::default_foreign_attributes );
field::attribute( op, "published_in", published_in );
}
};
}
#endif //BOOK_HPP