From acf79a306797b1b12e95415c340792d7c88815ab Mon Sep 17 00:00:00 2001 From: Melody Horn / boringcactus Date: Fri, 18 Jun 2021 13:42:52 -0600 Subject: lay groundwork for make-migrations --- tosin-macros/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tosin-macros') diff --git a/tosin-macros/src/lib.rs b/tosin-macros/src/lib.rs index 531a92b..86750e1 100644 --- a/tosin-macros/src/lib.rs +++ b/tosin-macros/src/lib.rs @@ -20,9 +20,11 @@ pub fn model_derive(input: TokenStream) -> TokenStream { fn impl_model(ast: &syn::DeriveInput) -> TokenStream { let name = &ast.ident; let gen = quote! { + use tosin::db::models::ModelMeta; impl #name { - pub const META: tosin::db::models::ModelMeta = tosin::db::models::ModelMeta { + pub const META: ModelMeta = ModelMeta { name: stringify!(#name), + fields: &[], }; } }; -- cgit v1.2.3