Skip to content

Commit

Permalink
fixed: pgorm
Browse files Browse the repository at this point in the history
  • Loading branch information
zodial committed Nov 7, 2024
1 parent bbc0046 commit 1b10607
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion console/commands/pgorm/pgsql.go
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,12 @@ func PgTypeToGoType(pgType string, columnName string) string {
return "database.JSON"
case "time", "timetz":
return "database.Time"
case "numeric":
case "float4":
return "float32"
case "float8", "numeric":
return "float64"
case "bool":
return "bool"
case "bytea":
return "[]byte"
default:
Expand Down
2 changes: 1 addition & 1 deletion console/commands/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var goMethodStr = `package {package}
import ({import})
// {action}{doc}
// {action} {doc}
func (receiver *Controller) {action}(req *{paramAlias}.{param}, ctx http.Context) (*{returnAlias}.{return}, error) {
// TODO 这里写业务
return &{returnAlias}.{return}{}, nil
Expand Down

0 comments on commit 1b10607

Please sign in to comment.