代码生成

This commit is contained in:
PandaGoAdmin
2022-01-03 19:03:39 +08:00
parent 1a1f137725
commit b6a8fe5e1b
53 changed files with 2467 additions and 459 deletions

View File

@@ -9,6 +9,8 @@ import (
"pandax/base/config"
"pandax/base/global"
"time"
_ "github.com/lib/pq"
)
func GormInit(ty string) *gorm.DB {
@@ -53,6 +55,7 @@ func GormPostgresql() *gorm.DB {
global.Log.Panic("未找到数据库配置信息")
return nil
}
global.Log.Infof("连接postgres [%s]", m.PgDsn())
db, err := sql.Open("postgres", m.PgDsn())
if err != nil {
global.Log.Panicf("连接postgresql失败! [%s]", err.Error())