22 lines
407 B
C++
22 lines
407 B
C++
#ifndef MODEL_HPP
|
|
#define MODEL_HPP
|
|
|
|
#include "matador/utils/access.hpp"
|
|
|
|
#include <cstdint>
|
|
|
|
namespace work::core {
|
|
struct Model {
|
|
uint64_t id;
|
|
uint64_t 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
|