mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-17 07:19:02 +08:00
Merge remote-tracking branch 'origin/errcode' into errcode
# Conflicts: # cmd/api/main.go # internal/api/a2r/api2rpc.go # internal/apiresp/resp.go # internal/msgtransfer/online_history_msg_handler.go # internal/push/consumer_init.go # pkg/common/db/controller/conversation.go # pkg/common/mw/gin.go # pkg/statistics/statistics.go
This commit is contained in:
@@ -7,19 +7,19 @@ import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
func NewObjectHash(db *gorm.DB) relation.ObjectHashModelInterface {
|
||||
return &ObjectHashGorm{
|
||||
DB: db,
|
||||
}
|
||||
type ObjectHashGorm struct {
|
||||
*MetaDB
|
||||
}
|
||||
|
||||
type ObjectHashGorm struct {
|
||||
DB *gorm.DB
|
||||
func NewObjectHash(db *gorm.DB) relation.ObjectHashModelInterface {
|
||||
return &ObjectHashGorm{
|
||||
NewMetaDB(db, &relation.ObjectHashModel{}),
|
||||
}
|
||||
}
|
||||
|
||||
func (o *ObjectHashGorm) NewTx(tx any) relation.ObjectHashModelInterface {
|
||||
return &ObjectHashGorm{
|
||||
DB: tx.(*gorm.DB),
|
||||
NewMetaDB(tx.(*gorm.DB), &relation.ObjectHashModel{}),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user