Add support for database uuid types.

This commit is contained in:
zer0sub 2019-04-04 13:07:21 +02:00
parent 2c7a9f5058
commit 37b0a6445b
6 changed files with 126 additions and 44 deletions

View file

@ -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"
}
}