pre-dev: add gorm setting into extracalls
This commit is contained in:
No files matched your search
@@ -0,0 +1,19 @@
|
||||
package gormsetting
|
||||
|
||||
import (
|
||||
dg "github.com/karincake/apem/db-gorm-pg"
|
||||
// "gorm.io/gorm"
|
||||
|
||||
"gorm.io/gorm"
|
||||
"gorm.io/gorm/schema"
|
||||
)
|
||||
|
||||
func Adjust() {
|
||||
dg.GormConfig = &gorm.Config{
|
||||
// Logger: logger.Default.LogMode(logger.Error),
|
||||
NamingStrategy: schema.NamingStrategy{
|
||||
SingularTable: true,
|
||||
NoLowerCase: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user