mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-03 00:25:59 +08:00
errcode
This commit is contained in:
@@ -1,42 +0,0 @@
|
||||
package unrelation
|
||||
|
||||
import "context"
|
||||
|
||||
const (
|
||||
CTag = "tag"
|
||||
CSendLog = "send_log"
|
||||
)
|
||||
|
||||
type TagModel struct {
|
||||
UserID string `bson:"user_id"`
|
||||
TagID string `bson:"tag_id"`
|
||||
TagName string `bson:"tag_name"`
|
||||
UserList []string `bson:"user_list"`
|
||||
}
|
||||
|
||||
func (TagModel) TableName() string {
|
||||
return CTag
|
||||
}
|
||||
|
||||
type TagSendLogModel struct {
|
||||
UserList []CommonUserModel `bson:"tag_list"`
|
||||
SendID string `bson:"send_id"`
|
||||
SenderPlatformID int32 `bson:"sender_platform_id"`
|
||||
Content string `bson:"content"`
|
||||
SendTime int64 `bson:"send_time"`
|
||||
}
|
||||
|
||||
func (TagSendLogModel) TableName() string {
|
||||
return CSendLog
|
||||
}
|
||||
|
||||
type TagModelInterface interface {
|
||||
GetUserTags(ctx context.Context, userID string) ([]TagModel, error)
|
||||
CreateTag(ctx context.Context, userID, tagName string, userList []string) error
|
||||
GetTagByID(ctx context.Context, userID, tagID string) (TagModel, error)
|
||||
DeleteTag(ctx context.Context, userID, tagID string) error
|
||||
SetTag(ctx context.Context, userID, tagID, newName string, increaseUserIDList []string, reduceUserIDList []string) error
|
||||
GetUserIDListByTagID(ctx context.Context, userID, tagID string) ([]string, error)
|
||||
SaveTagSendLog(ctx context.Context, tagSendLog *TagSendLogModel) error
|
||||
GetTagSendLogs(ctx context.Context, userID string, showNumber, pageNumber int32) ([]TagSendLogModel, error)
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
package unrelation
|
||||
|
||||
import "context"
|
||||
|
||||
const (
|
||||
CWorkMoment = "work_moment"
|
||||
)
|
||||
|
||||
type WorkMoment struct {
|
||||
WorkMomentID string `bson:"work_moment_id"`
|
||||
UserID string `bson:"user_id"`
|
||||
UserName string `bson:"user_name"`
|
||||
FaceURL string `bson:"face_url"`
|
||||
Content string `bson:"content"`
|
||||
LikeUserList []*CommonUserModel `bson:"like_user_list"`
|
||||
AtUserList []*CommonUserModel `bson:"at_user_list"`
|
||||
PermissionUserList []*CommonUserModel `bson:"permission_user_list"`
|
||||
Comments []*CommonUserModel `bson:"comments"`
|
||||
PermissionUserIDList []string `bson:"permission_user_id_list"`
|
||||
Permission int32 `bson:"permission"`
|
||||
CreateTime int32 `bson:"create_time"`
|
||||
}
|
||||
|
||||
type Comment struct {
|
||||
UserID string `bson:"user_id" json:"user_id"`
|
||||
UserName string `bson:"user_name" json:"user_name"`
|
||||
ReplyUserID string `bson:"reply_user_id" json:"reply_user_id"`
|
||||
ReplyUserName string `bson:"reply_user_name" json:"reply_user_name"`
|
||||
ContentID string `bson:"content_id" json:"content_id"`
|
||||
Content string `bson:"content" json:"content"`
|
||||
CreateTime int32 `bson:"create_time" json:"create_time"`
|
||||
}
|
||||
|
||||
func (WorkMoment) TableName() string {
|
||||
return CWorkMoment
|
||||
}
|
||||
|
||||
type WorkMomentModelInterface interface {
|
||||
CreateOneWorkMoment(ctx context.Context, workMoment *WorkMoment) error
|
||||
DeleteOneWorkMoment(ctx context.Context, workMomentID string) error
|
||||
DeleteComment(ctx context.Context, workMomentID, contentID, opUserID string) error
|
||||
GetWorkMomentByID(ctx context.Context, workMomentID string) (*WorkMoment, error)
|
||||
LikeOneWorkMoment(ctx context.Context, likeUserID, userName, workMomentID string) (*WorkMoment, bool, error)
|
||||
CommentOneWorkMoment(ctx context.Context, comment *Comment, workMomentID string) (*WorkMoment, error)
|
||||
GetUserSelfWorkMoments(ctx context.Context, userID string, showNumber, pageNumber int32) ([]*WorkMoment, error)
|
||||
GetUserWorkMoments(ctx context.Context, opUserID, userID string, showNumber, pageNumber int32, friendIDList []string) ([]*WorkMoment, error)
|
||||
GetUserFriendWorkMoments(ctx context.Context, showNumber, pageNumber int32, userID string, friendIDList []string) ([]*WorkMoment, error)
|
||||
}
|
||||
Reference in New Issue
Block a user