chapter.proto 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. syntax = "proto3";
  2. import "public.proto";
  3. package pcds.chapter.v1;
  4. /*
  5. * channel/版本 服务
  6. */
  7. service Chapter{
  8. rpc GetStudioList (ChapterListRequest) returns (ResListReply){}//查询符合要求的 studio 列表
  9. rpc GetChannelList (ChapterListRequest) returns (ResListReply){}//查询符合要求的 channel 列表
  10. rpc GetTagList (ChapterListRequest) returns (ResListReply){}//查询符合要求的 tag 列表
  11. rpc GetLangList (ChapterListRequest) returns (ResListReply){}//查询符合要求的 language 列表
  12. rpc GetChapterList (ChapterListRequest) returns (ChapterListReply){}//查询符合要求的 chapter 列表
  13. rpc GetChapterTitle (ChapterRequest) returns (ChapterReply){} //获取章节标题
  14. rpc GetChapter (ChapterRequest) returns (ChapterReply){}
  15. rpc UpgradeChapter (ChapterRequest) returns (ChapterReply){} //这个不确定要不要,可能可以放到mq
  16. }
  17. message ChapterListRequest{
  18. string Id = 1;
  19. string Search = 3;
  20. EnumAllowingSearch SearchCol = 4;
  21. int32 CurrentPage = 5;
  22. int32 PerPage = 6;
  23. EnumAllowingOrderby OrderBy = 7;
  24. bool Desc = 8;
  25. }
  26. enum EnumAllowingSearch{
  27. EAS_TITLE = 0;
  28. }
  29. enum EnumAllowingOrderby{
  30. EAO_CREATE_AT = 0;
  31. EAO_TITLE = 1;
  32. }
  33. enum EnumChannelType{
  34. ECT_TRANSLATION = 0;
  35. ECT_ORIGINAL = 1;
  36. ECT_NISSAYA = 2;
  37. ECT_COMMENTRAY = 3;
  38. ECT_GENERAL = 4;
  39. }
  40. message ChapterRequest{
  41. string Id = 1;
  42. int32 Book = 2;
  43. int32 Paragraph = 3;
  44. string Channel = 4;
  45. EnumChannelType ChannelType = 4;
  46. string PaliTitle = 5;
  47. string Title = 2;
  48. string Summary = 3;
  49. string StudioId = 5;
  50. string Lang = 51;
  51. repeated User Editors = 52;
  52. EnumPublicity Publicity = 53;
  53. string CreatedAt = 101;
  54. string UpdatedAt = 102;
  55. }
  56. message ChapterReply{
  57. bool ok = 1;
  58. string message = 2;
  59. ChapterRequest data = 3;
  60. }
  61. message ResWithCount{
  62. string Id = 1;
  63. string Name = 2;
  64. int32 Count = 3;
  65. }
  66. message ResListReply{
  67. bool ok = 1;
  68. string message = 2;
  69. message data{
  70. repeated ResWithCount rows = 1;
  71. }
  72. }
  73. message ChapterListReply{
  74. bool ok = 1;
  75. string message = 2;
  76. message data{
  77. repeated ChapterRequest rows = 1;
  78. int32 Count = 2;
  79. int32 PageNo = 3;
  80. int32 PageSize = 4;
  81. }
  82. }