aboutsummaryrefslogtreecommitdiff
path: root/tosin-macros
diff options
context:
space:
mode:
authorMelody Horn / boringcactus <melody@boringcactus.com>2021-06-18 13:42:52 -0600
committerMelody Horn / boringcactus <melody@boringcactus.com>2021-06-18 13:42:52 -0600
commitacf79a306797b1b12e95415c340792d7c88815ab (patch)
treee2c34c6620e0782e31278c087f5ce201606ce9c0 /tosin-macros
parent7969e3a85dcb2d936fa2e09b4253b8e801c48c6e (diff)
downloadtosin-acf79a306797b1b12e95415c340792d7c88815ab.tar.gz
tosin-acf79a306797b1b12e95415c340792d7c88815ab.zip
lay groundwork for make-migrations
Diffstat (limited to 'tosin-macros')
-rw-r--r--tosin-macros/src/lib.rs4
1 files changed, 3 insertions, 1 deletions
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: &[],
};
}
};