This commit is contained in:
wangchuxiao
2023-01-29 10:31:01 +08:00
parent 87e61046cb
commit 68d595b558
6 changed files with 72 additions and 32 deletions
+1 -3
View File
@@ -28,9 +28,7 @@ type Group struct {
}
func NewGroupDB(db *gorm.DB) *Group {
var group Group
group.DB = db.Model(&Group{})
return &group
return &Group{DB: db}
}
func (g *Group) Create(ctx context.Context, groups []*Group) (err error) {