You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
508 B
Go

package gtools
const (
_tag_gorm = "gorm"
_tag_json = "json"
)
//精确匹配类型
var TypeDicMp = map[string]string{
"int": "int",
"bigint": "int64",
"varchar": "string",
"datetime": "time.Time",
"tinyint(1)": "bool",
"tinyint(1) unsigned": "bool",
"json": "string",
}
//模糊匹配类型
var TypeMatchMp = map[string]string{
`int[(]\d+[)]`: "int",
`bigint[(]\d+[)]`: "int64",
`varchar[(]\d+[)]`: "string",
}