group complete

This commit is contained in:
withchao
2023-02-08 20:08:22 +08:00
parent b3ae69ce94
commit f20e9e71b7
15 changed files with 544 additions and 864 deletions
+11 -1
View File
@@ -1,6 +1,9 @@
package relation
import "time"
import (
"context"
"time"
)
const (
GroupModelTableName = "groups"
@@ -29,4 +32,11 @@ func (GroupModel) TableName() string {
}
type GroupModelInterface interface {
Create(ctx context.Context, groups []*GroupModel, tx ...any) (err error)
//Delete(ctx context.Context, groupIDs []string, tx ...any) (err error)
UpdateMap(ctx context.Context, groupID string, args map[string]interface{}, tx ...any) (err error)
UpdateStatus(ctx context.Context, groupID string, status int32, tx ...any) (err error)
Find(ctx context.Context, groupIDs []string, tx ...any) (groups []*GroupModel, err error)
Take(ctx context.Context, groupID string, tx ...any) (group *GroupModel, err error)
Search(ctx context.Context, keyword string, pageNumber, showNumber int32, tx ...any) (total int32, groups []*GroupModel, err error)
}