25 lines
655 B
C++
25 lines
655 B
C++
#ifndef USERINFO_HPP
|
|
#define USERINFO_HPP
|
|
|
|
#include "matador/utils/access.hpp"
|
|
#include "matador/utils/field_attributes.hpp"
|
|
|
|
namespace work::core {
|
|
struct UserInfo {
|
|
unsigned long long user_session_id;
|
|
std::string user_role;
|
|
std::string database_name;
|
|
|
|
template<typename Operator>
|
|
void process( Operator& op ) {
|
|
namespace field = matador::access;
|
|
using namespace matador;
|
|
field::attribute( op, "user_session_id", user_session_id );
|
|
field::attribute( op, "user_role", user_role, VarChar255 );
|
|
field::attribute( op, "database_name", database_name, VarChar255 );
|
|
}
|
|
};
|
|
}
|
|
|
|
#endif //USERINFO_HPP
|