Remind.proto 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. syntax = "proto3";
  2. package userext.v1;
  3. option go_package = "v1";
  4. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  5. service Remind {
  6. /** 预约、取消提醒
  7. *
  8. */
  9. rpc operate (RemindOperateReq) returns (RemindOperateResp);
  10. /** 查询预约状态
  11. *
  12. */
  13. rpc query (RemindQueryReq) returns (RemindQueryResp);
  14. /** 预约、取消提醒
  15. *
  16. */
  17. rpc submit (RemindSubmitReq) returns (RemindSubmitResp);
  18. /** 查询预约状态
  19. *
  20. */
  21. rpc get (RemindGetReq) returns (RemindGetResp);
  22. }
  23. message RemindOperateReq {
  24. // 活动 id
  25. int64 aid = 1 [(gogoproto.jsontag) = "aid"];
  26. // 0.取消 1.预约
  27. int64 action = 2 [(gogoproto.jsontag) = "action"];
  28. }
  29. message RemindOperateResp {
  30. // code
  31. int64 code = 1 [(gogoproto.jsontag) = "code"];
  32. // msg 
  33. string msg = 2 [(gogoproto.jsontag) = "msg"];
  34. //
  35. Data data = 3 [(gogoproto.jsontag) = "data"];
  36. message Data {
  37. }
  38. }
  39. message RemindQueryReq {
  40. // 活动 id
  41. int64 aid = 1 [(gogoproto.jsontag) = "aid"];
  42. }
  43. message RemindQueryResp {
  44. // code
  45. int64 code = 1 [(gogoproto.jsontag) = "code"];
  46. // msg 
  47. string msg = 2 [(gogoproto.jsontag) = "msg"];
  48. //
  49. Data data = 3 [(gogoproto.jsontag) = "data"];
  50. message Data {
  51. // 活动 ID
  52. int64 aid = 1 [(gogoproto.jsontag) = "aid"];
  53. // 1.已经预约 2.没有预约
  54. int64 status = 2 [(gogoproto.jsontag) = "status"];
  55. }
  56. }
  57. message RemindSubmitReq {
  58. // 事件类型
  59. int64 type = 1 [(gogoproto.jsontag) = "type"];
  60. // 事件 id (多个用逗号拼接)
  61. string event_id = 2 [(gogoproto.jsontag) = "event_id"];
  62. // 提交来源
  63. int64 source = 3 [(gogoproto.jsontag) = "source"];
  64. // 1.预约 2.取消预约
  65. int64 action = 4 [(gogoproto.jsontag) = "action"];
  66. }
  67. message RemindSubmitResp {
  68. // code
  69. int64 code = 1 [(gogoproto.jsontag) = "code"];
  70. // msg (预约成功,已过期,未开始)
  71. string msg = 2 [(gogoproto.jsontag) = "msg"];
  72. //
  73. Data data = 3 [(gogoproto.jsontag) = "data"];
  74. message Data {
  75. }
  76. }
  77. message RemindGetReq {
  78. // 事件类型
  79. int64 type = 1 [(gogoproto.jsontag) = "type"];
  80. // 事件 id
  81. string event_id = 2 [(gogoproto.jsontag) = "event_id"];
  82. }
  83. message RemindGetResp {
  84. // code
  85. int64 code = 1 [(gogoproto.jsontag) = "code"];
  86. // msg 
  87. string msg = 2 [(gogoproto.jsontag) = "msg"];
  88. //
  89. Data data = 3 [(gogoproto.jsontag) = "data"];
  90. message List {
  91. // 事件类型
  92. int64 type = 1 [(gogoproto.jsontag) = "type"];
  93. // 活动 ID
  94. int64 event_id = 2 [(gogoproto.jsontag) = "event_id"];
  95. // 1.已经预约 2.没有预约
  96. int64 status = 3 [(gogoproto.jsontag) = "status"];
  97. // 预约的时间
  98. string date = 4 [(gogoproto.jsontag) = "date"];
  99. }
  100. message Data {
  101. //
  102. repeated List list = 1 [(gogoproto.jsontag) = "list"];
  103. }
  104. }