gen : upgrade gen
This commit is contained in:
1 parent
80ef9e46ab
commit
89fe63c915
3 files changed
+31
-6
No files matched your search
@@ -168,8 +168,15 @@ func genTableInit(tablesList []string, i int, c *gin.Context) (tools.SysTables,
|
||||
}
|
||||
|
||||
if strings.Contains(dbcolumn[i].ColumnType, "int") {
|
||||
column.GoType = "int"
|
||||
if strings.Contains(dbcolumn[i].ColumnKey, "PR") {
|
||||
column.GoType = "int"
|
||||
} else {
|
||||
column.GoType = "string"
|
||||
}
|
||||
column.HtmlType = "input"
|
||||
} else if strings.Contains(dbcolumn[i].ColumnType, "timestamp") {
|
||||
column.GoType = "time.Time"
|
||||
column.HtmlType = "datetime"
|
||||
} else {
|
||||
column.GoType = "string"
|
||||
column.HtmlType = "input"
|
||||
|
||||
Reference in new issue
Block a user