Add type mapping

This commit is contained in:
Chris Tsang 2021-09-08 00:12:47 +08:00
parent 5567fbc289
commit c0a77c1298

View File

@ -163,9 +163,9 @@ pub fn expand_derive_entity_model(data: Data, attrs: Vec<Attribute>) -> syn::Res
"bool" => quote! { Boolean }, "bool" => quote! { Boolean },
"NaiveDate" => quote! { Date }, "NaiveDate" => quote! { Date },
"NaiveTime" => quote! { Time }, "NaiveTime" => quote! { Time },
"NaiveDateTime" => quote! { DateTime }, "DateTime" | "NaiveDateTime" => quote! { DateTime },
"Uuid" => quote! { Uuid }, "Uuid" => quote! { Uuid },
"Decimal" => quote! { BigInteger }, "Decimal" => quote! { Decimal },
_ => { _ => {
return Err(Error::new( return Err(Error::new(
field.span(), field.span(),