This commit is contained in:
wangchuxiao
2023-03-15 18:35:06 +08:00
parent 2a60974ebd
commit 74d1d760aa
15 changed files with 97 additions and 83 deletions
+7 -7
View File
@@ -8,19 +8,19 @@ import (
"time"
)
func NewObjectPut(db *gorm.DB) relation.ObjectPutModelInterface {
return &ObjectPutGorm{
DB: db,
}
type ObjectPutGorm struct {
*MetaDB
}
type ObjectPutGorm struct {
DB *gorm.DB
func NewObjectPut(db *gorm.DB) relation.ObjectPutModelInterface {
return &ObjectPutGorm{
NewMetaDB(db, &relation.ObjectPutModel{}),
}
}
func (o *ObjectPutGorm) NewTx(tx any) relation.ObjectPutModelInterface {
return &ObjectPutGorm{
DB: tx.(*gorm.DB),
NewMetaDB(tx.(*gorm.DB), &relation.ObjectPutModel{}),
}
}