Merge branch 'master' of https://github.com/LLLLancelot/gormt into LLLLancelot-master

This commit is contained in:
xxjwxc
2020-02-28 22:48:56 +08:00
17 changed files with 167 additions and 116 deletions

View File

@@ -10,8 +10,14 @@ var EImportsHead = map[string]string{
// TypeMysqlDicMp Accurate matching type.精确匹配类型
var TypeMysqlDicMp = map[string]string{
"tinyint": "int8",
"tinyint unsigned": "uint8",
"smallint": "int16",
"smallint unsigned": "uint16",
"int": "int",
"int unsigned": "uint",
"bigint": "int64",
"bigint unsigned": "uint64",
"varchar": "string",
"char": "string",
"date": "time.Time",
@@ -34,7 +40,7 @@ var TypeMysqlDicMp = map[string]string{
// TypeMysqlMatchMp Fuzzy Matching Types.模糊匹配类型
var TypeMysqlMatchMp = map[string]string{
`^(tinyint)[(]\d+[)]`: "int8",
`^(smallint)[(]\d+[)]`: "int8",
`^(smallint)[(]\d+[)]`: "int16",
`^(int)[(]\d+[)]`: "int",
`^(bigint)[(]\d+[)]`: "int64",
`^(char)[(]\d+[)]`: "string",
@@ -45,4 +51,5 @@ var TypeMysqlMatchMp = map[string]string{
`^(mediumint)[(]\d+[)]`: "string",
`^(double)[(]\d+,\d+[)]`: "float64",
`^(float)[(]\d+,\d+[)]`: "float64",
`^(datetime)[(]\d+[)]`: "time.Time",
}