enterprise/common/dao/dao.go

21 lines
200 B
Go
Raw Normal View History

2023-08-04 18:27:37 +08:00
package dao
import "gorm.io/gorm"
var (
2024-11-04 23:00:55 +08:00
db *gorm.DB
unifyDB *gorm.DB
2023-08-04 18:27:37 +08:00
)
func SetDB(d *gorm.DB) {
db = d
}
2024-11-04 23:00:55 +08:00
func SetUnifyDB(d *gorm.DB) {
unifyDB = d
}
2023-08-04 18:27:37 +08:00
func GetDB() *gorm.DB {
return db
}