Skip to content

Commit 76d9198

Browse files
committed
feat: commonDao add Db function
1 parent 0992df6 commit 76d9198

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

gplus/common_dao.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ import (
2424
type CommonDao[T any] struct {
2525
}
2626

27+
func (service CommonDao[T]) Db() *gorm.DB {
28+
return gormDb
29+
}
30+
2731
func (service CommonDao[T]) Save(entity *T) *gorm.DB {
2832
return Insert[T](entity)
2933
}

0 commit comments

Comments
 (0)