upgrade: 数据类型识别,支持识别无符号类型

This commit is contained in:
2025-08-17 12:45:04 +08:00
parent e7f4e3fca2
commit 69a4a3925e

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}"]
}*/ }*/