coin.go 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. package model
  2. import (
  3. "encoding/json"
  4. "go-common/library/time"
  5. )
  6. // Message binlog databus msg.
  7. type Message struct {
  8. Action string `json:"action"`
  9. Table string `json:"table"`
  10. New json.RawMessage `json:"new"`
  11. Old json.RawMessage `json:"old"`
  12. }
  13. // UserCoin dede_member user coin.
  14. type UserCoin struct {
  15. Mid int64 `json:"mid"`
  16. Money float32 `money:"money"`
  17. Mtime time.Time `json:"mtime"`
  18. }
  19. // DatabusCoin databus coin msg.
  20. type DatabusCoin struct {
  21. Mid int64 `json:"mid"`
  22. Money float32 `money:"money"`
  23. Mtime string `json:"modify_time"`
  24. }
  25. // CoinSettle coin settle.
  26. type CoinSettle struct {
  27. ITime time.Time `json:"itime"`
  28. CTime time.Time `json:"ctime"`
  29. MTime time.Time `json:"mtime"`
  30. ID int64 `json:"id"`
  31. Mid int64 `json:"mid"`
  32. Aid int64 `json:"aid"`
  33. AvType int64 `json:"avtype"`
  34. CoinCount int64 `json:"coin_count"`
  35. ExpTotal int64 `json:"exp_total"`
  36. ExpSub int64 `json:"exp_sub"`
  37. State int `json:"state"`
  38. Describe string `json:"describe"`
  39. }
  40. // CoinSettlePeriod coin settle conf.
  41. type CoinSettlePeriod struct {
  42. ID int64 `json:"id"`
  43. FromYear int `json:"from_year"`
  44. FromMonth int `json:"from_month"`
  45. FromDay int `json:"from_day"`
  46. ToYear int `json:"to_year"`
  47. ToMonth int `json:"to_month"`
  48. ToDay int `json:"to_day"`
  49. CTime time.Time `json:"ctime"`
  50. MTime time.Time `json:"mtime"`
  51. }
  52. // LoginLog user login log.
  53. type LoginLog struct {
  54. Mid int64 `json:"mid,omitempty"`
  55. IP string `json:"ip,omitempty"`
  56. CTime string `json:"ctime"`
  57. Action string `json:"action"`
  58. Business int `json:"business"`
  59. Type int `json:"type"`
  60. RawData string
  61. Timestamp int64
  62. }
  63. // AddExp databus add exp arg.
  64. type AddExp struct {
  65. Event string `json:"event,omitempty"`
  66. Mid int64 `json:"mid,omitempty"`
  67. IP string `json:"ip,omitempty"`
  68. Ts int64 `json:"ts,omitempty"`
  69. }