Skip to content

Commit

Permalink
feat: add NUMERIC
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkgos committed Mar 15, 2024
1 parent 1719312 commit 5b5c476
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model_parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func intoGoTypeType(t reflect.Type, tag reflect.StructTag) Type {
return TypeFloat64
case reflect.String:
typeValue := schema.ParseTagSetting(tag.Get("gorm"), ";")["TYPE"]
if strings.Contains(strings.ToUpper(typeValue), "DECIMAL") {
if v := strings.ToUpper(typeValue); strings.Contains(v, "DECIMAL") || strings.Contains(v, "NUMERIC") {
return TypeDecimal
}
return TypeString
Expand Down

0 comments on commit 5b5c476

Please sign in to comment.