mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-21 02:04:09 +00:00
gen : upgrade gen
This commit is contained in:
@@ -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