Update common.go

当表字段类型为datetime或者date并且默认为NULL时,在结构中需要设置成指针类型
master
方程 3 years ago committed by GitHub
parent a7169f22b8
commit 05b03752d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -100,6 +100,9 @@ func fixNullToPorint(name string, isNull bool) string {
if strings.HasPrefix(name, "float") {
return "*" + name
}
if strings.HasPrefix(name, "date") {
return "*" + name
}
if strings.HasPrefix(name, "time") {
return "*" + name
}

Loading…
Cancel
Save