introduced field_attributes shortcuts and added method on_base() to all processor classes

This commit is contained in:
2026-04-22 11:03:33 +02:00
parent 78eb5d04cd
commit 9b25f7f556
68 changed files with 248 additions and 151 deletions
+8 -7
View File
@@ -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 );
}
};