Correct Rust type to ColumnType mapping

This commit is contained in:
Chris Tsang 2021-09-17 23:06:41 +08:00
parent b1b5f95c1d
commit e7ec68f4c1

View File

@ -165,8 +165,8 @@ pub fn expand_derive_entity_model(data: Data, attrs: Vec<Attribute>) -> syn::Res
"String" | "&str" => quote! { String(None) }, "String" | "&str" => quote! { String(None) },
"u8" | "i8" => quote! { TinyInteger }, "u8" | "i8" => quote! { TinyInteger },
"u16" | "i16" => quote! { SmallInteger }, "u16" | "i16" => quote! { SmallInteger },
"u32" | "u64" | "i32" | "i64" => quote! { Integer }, "u32" | "i32" => quote! { Integer },
"u128" | "i128" => quote! { BigInteger }, "u64" | "i64" => quote! { BigInteger },
"f32" => quote! { Float }, "f32" => quote! { Float },
"f64" => quote! { Double }, "f64" => quote! { Double },
"bool" => quote! { Boolean }, "bool" => quote! { Boolean },