Add support for database uuid types.
This commit is contained in:
parent
2c7a9f5058
commit
37b0a6445b
6 changed files with 126 additions and 44 deletions
|
|
@ -21,8 +21,11 @@ func (t TableInfo) GetImports() []string {
|
|||
for _, column := range t.Columns {
|
||||
columnType := column.GoBaseType()
|
||||
|
||||
if columnType == "time.Time" {
|
||||
switch columnType {
|
||||
case "time.Time":
|
||||
imports["time.Time"] = "time"
|
||||
case "uuid.UUID":
|
||||
imports["uuid.UUID"] = "github.com/google/uuid"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue