like.go 536 B

12345678910111213141516171819202122232425
  1. package model
  2. import "encoding/json"
  3. const (
  4. ActUpdate = "update"
  5. ActInsert = "insert"
  6. ActDelete = "delete"
  7. )
  8. // Message canal binlog message.
  9. type Message struct {
  10. Action string `json:"action"`
  11. Table string `json:"table"`
  12. New json.RawMessage `json:"new"`
  13. Old json.RawMessage `json:"old"`
  14. }
  15. // LikeMsg msg
  16. type LikeMsg struct {
  17. BusinessID int64 `json:"business_id"`
  18. MessageID int64 `json:"message_id"`
  19. LikesCount int64 `json:"likes_count"`
  20. DislikesCount int64 `json:"dislikes_count"`
  21. }