优化数据库工具相关逻辑 #11

Merged
zhangdeman merged 4 commits from feature/fix_generate_tool into master 2025-08-17 12:59:53 +08:00
2 changed files with 53 additions and 39 deletions
Showing only changes of commit 69a4a3925e - Show all commits

View File

@ -110,6 +110,10 @@ func generateTable(tableName string, modelStructName string, columnList []*sqlpa
"{COMMENT}": comment, "{COMMENT}": comment,
"{TYPE}": sqlTypeMap[item.Type.Type], "{TYPE}": sqlTypeMap[item.Type.Type],
} }
if item.Type.Unsigned {
// 无符号
data["{TYPE}"] = sqlTypeMap[item.Type.Type+" unsigned"]
}
/*if data["{FIELD}"] == "ID" { /*if data["{FIELD}"] == "ID" {
basic.PrimaryFieldType = data["{TYPE}"] basic.PrimaryFieldType = data["{TYPE}"]
}*/ }*/