notification.proto 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. syntax = "proto3";
  2. import "public.proto";
  3. package pcds.notification.v1;
  4. /*
  5. * 通知
  6. *
  7. *
  8. *
  9. */
  10. service Notification{
  11. rpc GetNotificationList (NotificationListRequest) returns (NotificationListReply){}
  12. rpc GetNotification (NotificationRequest) returns (NotificationReply){}
  13. rpc AddNotification (NotificationRequest) returns (NotificationReply){}
  14. rpc DelNotification (NotificationRequest) returns (NotificationReply){}
  15. }
  16. message NotificationListRequest{
  17. string Id = 1;
  18. string Search = 3;
  19. EnumAllowingSearch SearchCol = 4;
  20. int32 CurrentPage = 5;
  21. int32 PerPage = 6;
  22. EnumAllowingOrderby OrderBy = 7;
  23. bool Desc = 8;
  24. }
  25. enum EnumAllowingSearch{
  26. EAS_WORD = 0;
  27. EAS_NOTE = 1;
  28. }
  29. enum EnumAllowingOrderby{
  30. EAO_UPDATED_AT = 0;
  31. EAO_CREATED_AT = 1;
  32. EAO_WORD = 2;
  33. }
  34. enum EnumSendMethod{
  35. ESM_WEB = 0;
  36. ESM_WECHAT = 1;
  37. ESM_DING = 2;
  38. ESM_EMAIL = 3;
  39. }
  40. message NotificationRequest{
  41. string Id = 1;
  42. string Title = 2;
  43. string Message = 3;
  44. repeated EnumSendMethod Method = 4;
  45. string Param = 5; // 发送参数,比如用wechat发送,要设置url
  46. string Topic = 6; //Topic uuid
  47. Studio Studio = 7;
  48. string Lang = 51;
  49. User Editor = 52;
  50. EnumPublicity Publicity = 53;
  51. string CreatedAt = 101;
  52. string UpdatedAt = 102;
  53. }
  54. message NotificationReply{
  55. bool ok = 1;
  56. string message = 2;
  57. NotificationRequest data = 3;
  58. }
  59. message NotificationListReply{
  60. bool ok = 1;
  61. string message = 2;
  62. message data{
  63. repeated NotificationRequest rows = 1;
  64. int32 Count = 2;
  65. int32 CurrentPage = 3;
  66. int32 PerPage = 4;
  67. }
  68. }