package initialization

import (
	"github.com/dzwvip/oracle"
	"gorm.io/gorm"
	"gorm.io/gorm/logger"
	"testData/global"
)

func InitOracle() {
	con, err := gorm.Open(oracle.Open("tkplusemi/tkplusemi@192.168.0.30:1521/topprod"), //
		&gorm.Config{
			Logger: logger.Default.LogMode(logger.Silent),
			//QueryFields: true,
		})
	if err != nil {
		println("oracle connect error:", err)
		panic(err)
	}
	global.Oracle = con
}
