Skip to content

Commit

Permalink
Added register_entity_modules!() macro
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed Oct 24, 2024
1 parent 0037a87 commit 126b232
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,3 +361,18 @@ macro_rules! register_entities_without_relation {
$(seaography::register_entity_without_relation!($builder, $module_paths);)*
};
}

#[macro_export]
macro_rules! register_entity_modules {
([$($module_paths:ident),+ $(,)?]) => {
pub fn register_entity_modules(mut builder: seaography::builder::Builder) -> seaography::builder::Builder {
seaography::register_entities!(
builder,
[
$($module_paths,)*
]
);
builder
}
};
}

0 comments on commit 126b232

Please sign in to comment.