mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-03 08:35:59 +08:00
feat: Remove MySQL and implement it all with Mongo (#1508)
* fix: GetUserReqApplicationList error when there is a disbanded group chat
* fix: error when querying some information about disbanded group
* fix: GetUserReqApplicationList dismissed group error
* fix: the original message referenced by the pull message processing is withdrawn
* fix: the original message referenced by the pull message processing is withdrawn
* fix: the original message referenced by the pull message processing is withdrawn
* fix: the original message referenced by the pull message processing is withdrawn
* fix: the original message referenced by the pull message processing is withdrawn
* fix: the original message referenced by the pull message processing is withdrawn
* fix: the original message referenced by the pull message processing is withdrawn
* fix: the original message referenced by the pull message processing is withdrawn
* fix: the original message referenced by the pull message processing is withdrawn
* merge
* cicd: robot automated Change
* sdkws.MsgData
* user
* interface{} -> any
* user
* third
* group
* group
* group
* group
* group
* group
* conversation
* standalone mysql db model
* tx
* s3
* group
* mongo
* group
* group
* group
* group
* group
* group
* refactor: add openim mysql to mongo refactor
Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
* refactor: add openim mysql to mongo refactor
Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
* remove mysql
* remove mysql
* friend
* friend
* friend
* friend
* friend
* friend
* group
* convert
* index
* index
* all
* all
* mysql2mongo
* data conversion
* up35
* up35
* feat: add format set
Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
* fix: fix scripts
Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
* merge main
* merge main
* Update init-config.sh
* fix: user args check
---------
Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
Co-authored-by: withchao <withchao@users.noreply.github.com>
Co-authored-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
Co-authored-by: Xinwei Xiong <3293172751@qq.com>
This commit is contained in:
@@ -17,45 +17,30 @@ package relation
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
GroupRequestModelTableName = "group_requests"
|
||||
"github.com/OpenIMSDK/tools/pagination"
|
||||
)
|
||||
|
||||
type GroupRequestModel struct {
|
||||
UserID string `gorm:"column:user_id;primary_key;size:64"`
|
||||
GroupID string `gorm:"column:group_id;primary_key;size:64"`
|
||||
HandleResult int32 `gorm:"column:handle_result"`
|
||||
ReqMsg string `gorm:"column:req_msg;size:1024"`
|
||||
HandledMsg string `gorm:"column:handle_msg;size:1024"`
|
||||
ReqTime time.Time `gorm:"column:req_time"`
|
||||
HandleUserID string `gorm:"column:handle_user_id;size:64"`
|
||||
HandledTime time.Time `gorm:"column:handle_time"`
|
||||
JoinSource int32 `gorm:"column:join_source"`
|
||||
InviterUserID string `gorm:"column:inviter_user_id;size:64"`
|
||||
Ex string `gorm:"column:ex;size:1024"`
|
||||
}
|
||||
|
||||
func (GroupRequestModel) TableName() string {
|
||||
return GroupRequestModelTableName
|
||||
UserID string `bson:"user_id"`
|
||||
GroupID string `bson:"group_id"`
|
||||
HandleResult int32 `bson:"handle_result"`
|
||||
ReqMsg string `bson:"req_msg"`
|
||||
HandledMsg string `bson:"handled_msg"`
|
||||
ReqTime time.Time `bson:"req_time"`
|
||||
HandleUserID string `bson:"handle_user_id"`
|
||||
HandledTime time.Time `bson:"handled_time"`
|
||||
JoinSource int32 `bson:"join_source"`
|
||||
InviterUserID string `bson:"inviter_user_id"`
|
||||
Ex string `bson:"ex"`
|
||||
}
|
||||
|
||||
type GroupRequestModelInterface interface {
|
||||
NewTx(tx any) GroupRequestModelInterface
|
||||
Create(ctx context.Context, groupRequests []*GroupRequestModel) (err error)
|
||||
Delete(ctx context.Context, groupID string, userID string) (err error)
|
||||
UpdateHandler(ctx context.Context, groupID string, userID string, handledMsg string, handleResult int32) (err error)
|
||||
Take(ctx context.Context, groupID string, userID string) (groupRequest *GroupRequestModel, err error)
|
||||
FindGroupRequests(ctx context.Context, groupID string, userIDs []string) (int64, []*GroupRequestModel, error)
|
||||
Page(
|
||||
ctx context.Context,
|
||||
userID string,
|
||||
pageNumber, showNumber int32,
|
||||
) (total uint32, groups []*GroupRequestModel, err error)
|
||||
PageGroup(
|
||||
ctx context.Context,
|
||||
groupIDs []string,
|
||||
pageNumber, showNumber int32,
|
||||
) (total uint32, groups []*GroupRequestModel, err error)
|
||||
FindGroupRequests(ctx context.Context, groupID string, userIDs []string) ([]*GroupRequestModel, error)
|
||||
Page(ctx context.Context, userID string, pagination pagination.Pagination) (total int64, groups []*GroupRequestModel, err error)
|
||||
PageGroup(ctx context.Context, groupIDs []string, pagination pagination.Pagination) (total int64, groups []*GroupRequestModel, err error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user