added a bigger real-life demo
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#ifndef MODEL_HPP
|
||||
#define MODEL_HPP
|
||||
|
||||
#include "matador/utils/access.hpp"
|
||||
|
||||
namespace work::core {
|
||||
struct Model {
|
||||
unsigned long long id;
|
||||
unsigned long long version;
|
||||
|
||||
template<typename Operator>
|
||||
void process( Operator& op ) {
|
||||
namespace field = matador::access;
|
||||
field::primary_key( op, "id", id );
|
||||
field::revision( op, "version", version );
|
||||
}
|
||||
};
|
||||
}
|
||||
#endif //MODEL_HPP
|
||||
Reference in New Issue
Block a user