From c0a77c1298227965b821545b48d06617fc34d46a Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Wed, 8 Sep 2021 00:12:47 +0800 Subject: [PATCH] Add type mapping --- sea-orm-macros/src/derives/entity_model.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sea-orm-macros/src/derives/entity_model.rs b/sea-orm-macros/src/derives/entity_model.rs index f3a8d4a2..ff125ca5 100644 --- a/sea-orm-macros/src/derives/entity_model.rs +++ b/sea-orm-macros/src/derives/entity_model.rs @@ -163,9 +163,9 @@ pub fn expand_derive_entity_model(data: Data, attrs: Vec) -> syn::Res "bool" => quote! { Boolean }, "NaiveDate" => quote! { Date }, "NaiveTime" => quote! { Time }, - "NaiveDateTime" => quote! { DateTime }, + "DateTime" | "NaiveDateTime" => quote! { DateTime }, "Uuid" => quote! { Uuid }, - "Decimal" => quote! { BigInteger }, + "Decimal" => quote! { Decimal }, _ => { return Err(Error::new( field.span(),