package messagemod import ( "91porn-server/common/constant" "91porn-server/models/commod" "time" "go.mongodb.org/mongo-driver/bson/primitive" ) // 查询列表 type QueryCond struct { commod.Page MsgType int `form:"msgType" json:"msgType" binding:"required"` //1.点赞消息 2.评论消息 } // 查询会话消息列表 type QueryMsgCond struct { SessionId string `form:"sessionId" json:"sessionId" binding:"required"` commod.Page } // AddMsgReqInfo 新增私信实体 type AddMsgReqInfo struct { TakeUid uint64 `form:"takeUid" json:"takeUid" binding:"required"` // 接受用户uid Content string `form:"content" json:"content"` // 消息内容 ImgUrl []string `form:"imgUrl" json:"imgUrl"` // 图片链接 } // ChargePrivateLetterReq 私信扣费请求 type ChargePrivateLetterReq struct { TakeUid uint64 `form:"takeUid" json:"takeUid" binding:"required"` // 接受用户uid } // ChargePrivateLetterResp 私信扣费响应 type ChargePrivateLetterResp struct { Price int64 `json:"price"` // 本次应扣金币数 DeductAmount int64 `json:"deductAmount"` // 本次扣除金币余额 DeductIncome int64 `json:"deductIncome"` // 本次扣除收益余额 Amount int64 `json:"amount"` // 扣费后金币余额 Income int64 `json:"income"` // 扣费后收益余额 Balance int64 `json:"balance"` // 扣费后总余额 } // 已读实体 type ReadMsgReqInfo struct { MsgIds []string `form:"msgIds" json:"msgIds" binding:"required"` //阅读消息id } // MessageApp 消息app返回实体 type MessageApp struct { ID primitive.ObjectID `json:"id" bson:"_id"` // id SendUid uint64 `json:"sendUid" bson:"sendUid"` // 发送者uid SendName string `json:"sendName" bson:"sendName"` // 发送者姓名 SendAvatar string `json:"sendAvatar" bson:"sendAvatar"` // 发送者头像 TakeUid uint64 `json:"takeUid" bson:"takeUid"` // 接收者uid TakeName string `json:"takeName" bson:"takeName"` // 接收者姓名 TakeAvatar string `json:"takeAvatar" bson:"takeAvatar"` // 接收者头像 PeerImUserID int64 `json:"peerImUserId" bson:"peerImUserId"` // 对端 IM 平台用户 ID Content string `json:"content" bson:"content"` // 消息内容 ContentType int `json:"contentType" bson:"contentType"` // 消息内容类型 ImgUrl []string `json:"imgUrl" bson:"imgUrl"` // 消息图片内容链接 IsRead bool `json:"isRead" bson:"isRead"` // 消息已读or未读 SessionId string `json:"sessionId" bson:"sessionId"` // 会话id,私聊信息才有,便于分页查询 LinkUrl string `json:"linkUrl" bson:"linkUrl"` // 附带链接地址 CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间 ObjId primitive.ObjectID `json:"objId" bson:"objId"` // 动态消息使用,eg:被转发、点赞、评论帖子id ObjName string `json:"objName" bson:"objName"` // 动态消息使用,eg:被转发、点赞、评论帖子名称 } // MsgDynamicsApp 消息动态app返回实体 type MsgDynamicsApp struct { ID primitive.ObjectID `json:"id" bson:"_id"` // id SendUid uint64 `json:"sendUid" bson:"sendUid"` // 发送者uid SendName string `json:"sendName" bson:"sendName"` // 发送者姓名 SendAvatar string `json:"sendAvatar" bson:"sendAvatar"` // 发送者头像 SendGender string `json:"sendGender" bson:"sendGender"` // 发送者性别 SuperUser int `json:"SuperUser" bson:"SuperUser"` // 发送者是否大V Awards []int `json:"awards" bson:"awards"` // 发送者奖章 MsgType MsgType `json:"msgType" bson:"msgType"` // 消息类型 Content string `json:"content" bson:"content"` // 消息内容 IsRead bool `json:"isRead" bson:"isRead"` // 消息已读or未读 ObjId primitive.ObjectID `json:"objId" bson:"objId"` // 动态消息使用,eg:被转发、点赞、评论帖子id ObjName string `json:"objName" bson:"objName"` // 动态消息使用,eg:被转发、点赞、评论帖子名称 ObjCover string `json:"objCover" bson:"objCover"` // 动态消息使用,eg:被转发、点赞、评论帖子封面图 ObjType constant.NewsType `json:"objType" bson:"objType"` // 动态消息使用,eg:被转发、点赞、评论帖子类型 CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间 VipExpireDate time.Time `json:"vipExpireDate,omitempty" bson:"vipExpireDate"` VipLevel int `json:"vipLevel"` UserGroup []UserInfo `json:"userGroup" bson:"userGroup"` // 相同动态消息的用户集合,保留前十 UserCount int `json:"userCount" bson:"userCount"` // 相同动态消息的用户数 LikeCount int `json:"likeCount"` // 点赞数 ImgUrl string `json:"imgUrl"` // 帖子封面 } // NoReadMsgDynamicsCountApp 未读消息数 type NoReadMsgDynamicsCountApp struct { DtCount int `json:"dtCount"` // 动态未读数 MsgCount int `json:"msgCount"` // 消息未读数 }