assetsEvent.go 764 B

12345678910111213141516171819
  1. package eventmodels
  2. import "github.com/mhaya/game/game_cluster/internal/constant"
  3. // 资产变动事件
  4. type AssetsEventContent struct {
  5. UserBasic
  6. EventBasic
  7. OperationType constant.OperationTypeStr `json:"operation_type"` // 操作类型 增加:increase;减少:decrease
  8. Currency constant.CurrencyTypeStr `json:"currency"` // 货币类型
  9. Reason string `json:"reason"` // 变动原因
  10. BeforeBalance int64 `json:"before_balance"` // 变动前余额
  11. Amount int64 `json:"amount"` // 变动金额
  12. AfterBalance int64 `json:"after_balance"` // 变动后余额
  13. }
  14. func (e *AssetsEventContent) EventName() string {
  15. return "AssetsChange"
  16. }