蛋蛋星球-客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

md_im.go 3.5 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. package md
  2. import (
  3. "applet/app/pkg/pb"
  4. "code.fnuoos.com/EggPlanet/egg_models.git/src/model"
  5. )
  6. type SendRedPackageDetailReq struct {
  7. OrderId string `json:"order_id"` // 红包的订单 ID
  8. }
  9. type SeqType struct {
  10. Seq int `json:"seq"` // 序列号
  11. }
  12. type SendRedPackageDetailResp struct {
  13. Im SeqType `json:"im"`
  14. RedPackageID int64 `json:"red_package_id"` // 红包 ID
  15. }
  16. type GrabRedPackageReq struct {
  17. UserId string `json:"user_id"` //im用户id
  18. SendRedPackageUserNikeName string `json:"send_red_package_user_nike_name"` //红包发送者-im用户昵称
  19. SendRedPacketAvatarUrl string `json:"send_red_packet_avatar_url"` //红包发送者-im用户头像
  20. DeviceId string `json:"device_id"` //设备id
  21. Token string `json:"token"` //im-token
  22. ReceiverType int `json:"receiver_type"` //接收者类型,1:user;2:group
  23. ReceiverId int64 `json:"receiver_id"` //用户id或者群组id
  24. SendTime int64 `json:"send_time"` //消息发送时间戳,精确到毫秒
  25. RedPackageId int `json:"red_package_id"` //红包id
  26. RedPackageCover string `json:"red_package_cover"` //红包封面
  27. }
  28. type GrabRedPackageResp struct {
  29. Im *pb.SendRedPacketResp `json:"im"` // im 返回体
  30. GrabAmount string `json:"grab_amount"` // 抢到的红包金额
  31. }
  32. type RedPackageDetailUserNode struct {
  33. ImUserId string `json:"im_user_id"` //im用户id
  34. UserNickName string `json:"user_nick_name"` //im用户昵称
  35. UserAvatarUrl string `json:"user_avatar_url"` //im用户昵称
  36. Amount string `json:"amount"` //金额
  37. ReceiveAt string `json:"received_at"` //领取时间
  38. }
  39. type RedPackageDetailResp struct {
  40. List []RedPackageDetailUserNode `json:"list"` // 领取红包用户列表
  41. Detail model.ImSendRedPackageOrd `json:"detail"` // 红包详情信息
  42. }
  43. type SendRedPackageReq struct {
  44. UserId string `json:"user_id"` //im用户id
  45. DeviceId string `json:"device_id"` //设备id
  46. Token string `json:"token"` //im-token
  47. Amount string `json:"amount"` //红包金额
  48. RedPacketType int `json:"red_packet_type"` //红包类型(0:未知 1:好友红包 2:群组普通红包 3:群组手气红包 4:群组专属红包 5:系统红包)
  49. RedPacketNums int `json:"red_packet_nums"` //红包数量
  50. RedPacketContent string `json:"red_packet_content"` //红包文字内容
  51. RedPacketSmallContent string `json:"red_packet_small_content"` //红包文字内容
  52. ReceiverType int `json:"receiver_type"` //接收者类型,1:user;2:group
  53. ReceiverId int64 `json:"receiver_id"` //用户id或者群组id
  54. SendTime int64 `json:"send_time"` //消息发送时间戳,精确到毫秒
  55. ToUserIds []int64 `json:"to_user_ids"` //红包给到哪些im用户id(专属红包)
  56. RedPackageCover string `json:"red_package_cover"` //红包封面
  57. }
  58. type SendRedPackageResp struct {
  59. Im *pb.SendRedPacketResp `json:"im"`
  60. RedPackageId int64 `json:"red_package_id"` // 红包ID
  61. }