message.proto 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. syntax = "proto3";
  2. package tutorial;
  3. option java_package = "com.duowan.allstar.proto";
  4. option java_outer_classname = "MessageProtos";
  5. message Message {
  6. enum Type {
  7. SELF = 0;
  8. DATA = 1;
  9. NOTIFY = 2;
  10. ROLEOPT = 3;
  11. }
  12. Type type = 1;
  13. message DataMessage {
  14. int32 code = 1;
  15. int32 result = 2;
  16. string data = 3;
  17. string msg = 4;
  18. }
  19. DataMessage dataMessage = 2;
  20. // Enum nType {1: 普通通知;2: 好友列表通知; 3: 艺人列表通知}
  21. message NotificationMessage{
  22. int32 nType = 1;
  23. }
  24. NotificationMessage notificationMessage = 3;
  25. // 即对 targetUid 做了什么操作 opt
  26. // e.g.: 向 targetUid 赎身; 向 targetUid 签约
  27. // Enum opt {1: 赎身; 2: 抢夺; 3: 签约; 4: 解雇; 5: 入驻;6: 召回;7: 驱赶;8: 举报;9:通过好友申请;10:成为好友}
  28. message RoleOptMessage{
  29. // 目标用户
  30. int64 targetUid = 1;
  31. // 赎身或者抢夺成功时,前任老板的uid
  32. int64 exBossUid = 2;
  33. // 操作类型
  34. int32 opt = 3;
  35. }
  36. RoleOptMessage roleOptMessage = 4;
  37. string msg = 6;
  38. }