introduced field_attributes shortcuts and added method on_base() to all processor classes
This commit is contained in:
@@ -29,17 +29,18 @@ struct User : core::Model {
|
||||
|
||||
template<typename Operator>
|
||||
void process( Operator& op ) {
|
||||
namespace field = matador::access;
|
||||
using namespace matador;
|
||||
namespace field = access;
|
||||
field::process( op, *matador::base_class<Model>( this ) );
|
||||
field::attribute( op, "name", name, 511 );
|
||||
field::attribute( op, "name", name, UniqueVarChar511 );
|
||||
field::attribute( op, "symbol", symbol );
|
||||
field::attribute( op, "salt", salt, 511 );
|
||||
field::attribute( op, "password", password, 511 );
|
||||
field::attribute( op, "salt", salt, VarChar511 );
|
||||
field::attribute( op, "password", password, VarChar511 );
|
||||
field::attribute( op, "lock_type", lock_type );
|
||||
field::attribute( op, "locked_at", locked_at );
|
||||
field::attribute( op, "lock_reason", lock_reason, 511 );
|
||||
field::attribute( op, "role", role, 63 );
|
||||
field::belongs_to( op, "user_directory", user_directory, matador::utils::CascadeAllFetchLazy );
|
||||
field::attribute( op, "lock_reason", lock_reason, VarChar511 );
|
||||
field::attribute( op, "role", role, VarChar63 );
|
||||
field::belongs_to( op, "user_directory", user_directory, utils::CascadeAllFetchLazy );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user