db_msg.proto 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. syntax = "proto3";
  2. import "db_cmds.proto";
  3. package pb;
  4. option go_package = "/pb";
  5. /*
  6. db消息体
  7. */
  8. // 配置信息
  9. message DbConfig {
  10. string conf_name = 1;
  11. string conf_key = 2;
  12. string conf_value = 3;
  13. }
  14. message ArrayConfig {
  15. repeated DbConfig data_list = 1;
  16. }
  17. // 客服聊天记录
  18. message DbChatLog {
  19. string from_id = 1;
  20. string to_id = 2;
  21. string content = 3;
  22. int64 time_stamp = 4;
  23. EDbChatType chat_type = 5;
  24. string session_id = 6;
  25. int32 game_id = 7;
  26. bool is_visitor = 8;
  27. }
  28. message ArrayDbChatLog {
  29. repeated DbChatLog data_list = 1;
  30. }
  31. message DbChatRecord {
  32. string session_id = 3;
  33. string service_id = 1;
  34. string player_id = 2;
  35. bool is_visitor = 4;
  36. EDbRecordState state = 5;
  37. int64 time_stamp = 6;
  38. int32 game_id = 7;
  39. }
  40. message ArrayChatRecord {
  41. repeated DbChatRecord data_list = 1;
  42. }
  43. /*
  44. 命令消息
  45. */
  46. message DbCommandMsg {
  47. EDbCommand cmd_type = 1; // 命令类型
  48. int32 cmd_value = 2; // 通用val
  49. string cmd_str = 3; // 通用str
  50. oneof data {
  51. ArrayConfig array_config = 1001;
  52. DbChatLog chat_log = 1002;
  53. DbChatRecord chat_record = 1003;
  54. ArrayChatRecord array_chat_record = 1004;
  55. ArrayDbChatLog array_chat_log = 1005;
  56. }
  57. }