income_data.go 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. package proto
  2. // 收益类型
  3. const (
  4. IncomeType_Invalid = iota // 0=无效类型
  5. IncomeType_Game // 1=游戏收益
  6. IncomeType_Gift // 2=礼物收益
  7. )
  8. // 用户类型
  9. const (
  10. UserType_Invalid = iota // 0=无效类型
  11. UserType_Receiver // 1=普通用户
  12. UserType_RoomOwner // 2=房主用户
  13. )
  14. // 游戏类型
  15. const (
  16. GameType_Invalid = iota // 无效类型
  17. GameType_Consume // 1=消耗类型
  18. GameType_Rebate // 2=返利类型
  19. )
  20. // 触发数据
  21. type TriggerData struct {
  22. RoomId int // 房间id
  23. GameId int `json:",omitempty"` // 游戏id
  24. Receiver int // 接收方id
  25. RoomOwner int // 房主id
  26. ItemType int // 道具类型(1=金币 2=钻石)
  27. Amount int // 数量
  28. }
  29. // 游戏收益配置
  30. type GameIncomeConfig struct {
  31. GameId int // 游戏id
  32. GameType int // 游戏类型
  33. Incomes []GameIncome // 游戏收益
  34. }
  35. // 游戏收益信息
  36. type GameIncome struct {
  37. ItemType int // 道具类型(1=金币 2=钻石)
  38. Level int // 等级(收益档次)
  39. Ratio float64 // 收益比率
  40. }
  41. // 礼物收益配置
  42. type GiftIncomeConfig struct {
  43. Level int // 等级
  44. Incomes []GiftIncome // 收益信息
  45. }
  46. // 礼物收益信息
  47. type GiftIncome struct {
  48. ItemType int // 道具类型(1=金币 2=钻石)
  49. Receiver float64 // 接收者收益
  50. RoomOwner float64 // 房主收益
  51. }
  52. // 收益信息
  53. type IncomeInfo struct {
  54. ItemType int // 道具类型(1=金币 2=钻石)
  55. Balance float64 // 结余收益
  56. TotalProfit float64 // 累计收益
  57. }
  58. // 用户收益记录
  59. type IncomeLog struct {
  60. FromUserId int // 源用户id
  61. FromNickName string // 昵称
  62. FaceUrl string
  63. FaceId int
  64. RoomId int // 房间id
  65. GameId int // 游戏id
  66. ItemType int // 道具类型(1=金币 2=钻石)
  67. IncomeType int // 收益类型(1=游戏收益 2=礼物收益)
  68. UserType int // 用户类型(1=普通用户 2=房主用户)
  69. UserLevel int // 用户等级
  70. Amount int // 数量
  71. Profit float64 // 收益
  72. }
  73. // 用户收益统计
  74. type UserIncomeStat struct {
  75. FromUserId int // 源用户ID
  76. FromNickName string // 昵称
  77. FaceUrl string
  78. FaceId int
  79. GiftProfit float64 // 礼物收益
  80. GameProfit float64 // 游戏收益
  81. }
  82. // 游戏收益统计
  83. type GameIncomeStat struct {
  84. GameId int // 游戏id
  85. ChineseName string // 游戏名称
  86. Amount int // 投注数量
  87. Profit float64 // 收益
  88. }