mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-05 17:45:59 +08:00
db
This commit is contained in:
@@ -8,15 +8,15 @@ import (
|
||||
)
|
||||
|
||||
type FriendGorm struct {
|
||||
DB *gorm.DB
|
||||
*MetaDB
|
||||
}
|
||||
|
||||
func NewFriendGorm(db *gorm.DB) relation.FriendModelInterface {
|
||||
return &FriendGorm{DB: db}
|
||||
return &FriendGorm{NewMetaDB(db, &relation.FriendModel{})}
|
||||
}
|
||||
|
||||
func (f *FriendGorm) NewTx(tx any) relation.FriendModelInterface {
|
||||
return &FriendGorm{DB: tx.(*gorm.DB)}
|
||||
return &FriendGorm{NewMetaDB(tx.(*gorm.DB), &relation.FriendModel{})}
|
||||
}
|
||||
|
||||
// 插入多条记录
|
||||
|
||||
Reference in New Issue
Block a user