introduced field_attributes shortcuts and added method on_base() to all processor classes
This commit is contained in:
@@ -51,13 +51,14 @@ struct LoginHistory : core::Model {
|
||||
|
||||
template<typename Operator>
|
||||
void process( Operator& op ) {
|
||||
namespace field = matador::access;
|
||||
using namespace matador;
|
||||
namespace field = access;
|
||||
field::process_base<Model>( op, *this );
|
||||
field::process( op, *matador::base_class<Model>( this ) );
|
||||
field::belongs_to( op, "client", client, matador::utils::CascadeAllFetchLazy );
|
||||
field::belongs_to( op, "scenario", scenario, matador::utils::CascadeAllFetchLazy );
|
||||
field::belongs_to( op, "collection_center", collection_center, matador::utils::CascadeAllFetchLazy );
|
||||
field::attribute( op, "login_name", login_name, 511 );
|
||||
field::belongs_to( op, "client", client, utils::CascadeAllFetchLazy );
|
||||
field::belongs_to( op, "scenario", scenario, utils::CascadeAllFetchLazy );
|
||||
field::belongs_to( op, "collection_center", collection_center, utils::CascadeAllFetchLazy );
|
||||
field::attribute( op, "login_name", login_name, VarChar511 );
|
||||
field::attribute( op, "fail_reason", fail_reason );
|
||||
field::attribute( op, "login_time", login_time );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user