From 126b23240ace90867d0f3d71bb0fc4004dd2b0cf Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Thu, 24 Oct 2024 17:44:18 +0800 Subject: [PATCH] Added `register_entity_modules!()` macro --- src/builder.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/builder.rs b/src/builder.rs index 2de75389..592f5041 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -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 + } + }; +}