mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-01 07:35:58 +08:00
group complete
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package relation
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
GroupMemberModelTableName = "group_members"
|
||||
@@ -25,4 +28,17 @@ func (GroupMemberModel) TableName() string {
|
||||
}
|
||||
|
||||
type GroupMemberModelInterface interface {
|
||||
Create(ctx context.Context, groupMemberList []*GroupMemberModel, tx ...any) (err error)
|
||||
Delete(ctx context.Context, groupID string, userIDs []string, tx ...any) (err error)
|
||||
DeleteGroup(ctx context.Context, groupIDs []string, tx ...any) (err error)
|
||||
//UpdateByMap(ctx context.Context, groupID string, userID string, args map[string]interface{}, tx ...any) (err error)
|
||||
Update(ctx context.Context, groupID string, userID string, data map[string]any, tx ...any) (err error)
|
||||
UpdateRoleLevel(ctx context.Context, groupID string, userID string, roleLevel int32, tx ...any) (rowsAffected int64, err error)
|
||||
Find(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32, tx ...any) (groupList []*GroupMemberModel, err error)
|
||||
//FindGroupUser(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32, tx ...any) (groupList []*GroupMemberModel, err error)
|
||||
Take(ctx context.Context, groupID string, userID string, tx ...any) (groupMember *GroupMemberModel, err error)
|
||||
TakeOwner(ctx context.Context, groupID string, tx ...any) (groupMember *GroupMemberModel, err error)
|
||||
SearchMember(ctx context.Context, keyword string, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32, tx ...any) (total int32, groupList []*GroupMemberModel, err error)
|
||||
MapGroupMemberNum(ctx context.Context, groupIDs []string, tx ...any) (count map[string]uint32, err error)
|
||||
FindJoinUserID(ctx context.Context, groupIDs []string, tx ...any) (groupUsers map[string][]string, err error)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package relation
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
GroupRequestModelTableName = "group_requests"
|
||||
@@ -25,4 +28,12 @@ func (GroupRequestModel) TableName() string {
|
||||
}
|
||||
|
||||
type GroupRequestModelInterface interface {
|
||||
Create(ctx context.Context, groupRequests []*GroupRequestModel, tx ...any) (err error)
|
||||
//Delete(ctx context.Context, groupRequests []*GroupRequestModel, tx ...any) (err error)
|
||||
//UpdateMap(ctx context.Context, groupID string, userID string, args map[string]interface{}, tx ...any) (err error)
|
||||
UpdateHandler(ctx context.Context, groupID string, userID string, handledMsg string, handleResult int32, tx ...any) (err error)
|
||||
//Update(ctx context.Context, groupRequests []*GroupRequestModel, tx ...any) (err error)
|
||||
//Find(ctx context.Context, groupRequests []*GroupRequestModel, tx ...any) (resultGroupRequests []*GroupRequestModel, err error)
|
||||
Take(ctx context.Context, groupID string, userID string, tx ...any) (groupRequest *GroupRequestModel, err error)
|
||||
Page(ctx context.Context, userID string, pageNumber, showNumber int32, tx ...any) (total int32, groups []*GroupRequestModel, err error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user