channel.proto 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. syntax = "proto3";
  2. import "public.proto";
  3. package pcds.channel.v1;
  4. /*
  5. * channel/版本 服务
  6. * Studio 建立的时候会建立一个默认channel
  7. * 默认channel 一定为公开channel
  8. */
  9. service Channel{
  10. rpc GetChannelListForStudio (ChannelListRequest) returns (ChannelListReply){}
  11. rpc GetChannel (ChannelRequest) returns (ChannelReply){}
  12. rpc SetChannel (ChannelRequest) returns (ChannelReply){}
  13. rpc AddChannel (ChannelRequest) returns (ChannelReply){}
  14. rpc DelChannel (ChannelRequest) returns (ChannelReply){}
  15. }
  16. message ChannelListRequest{
  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_NAME = 0;
  27. }
  28. enum EnumAllowingOrderby{
  29. EAO_CREATE_AT = 0;
  30. EAO_NAME = 1;
  31. }
  32. enum EnumChannelType{
  33. ECT_TRANSLATION = 0;
  34. ECT_ORIGINAL = 1;
  35. ECT_NISSAYA = 2;
  36. ECT_COMMENTRAY = 3;
  37. ECT_GENERAL = 4;
  38. }
  39. message ChannelRequest{
  40. string Id = 1;
  41. string Name = 2;
  42. string Summary = 3;
  43. EnumChannelType ChannelType = 4;
  44. string StudioId = 5;
  45. string Lang = 51;
  46. string EditorId = 52;
  47. EnumPublicity Publicity = 53;
  48. string CreatedAt = 101;
  49. string UpdatedAt = 102;
  50. }
  51. message ChannelReply{
  52. bool ok = 1;
  53. string message = 2;
  54. ChannelRequest data = 3;
  55. }
  56. message ChannelListReply{
  57. bool ok = 1;
  58. string message = 2;
  59. message data{
  60. repeated ChannelRequest rows = 1;
  61. int32 Count = 2;
  62. int32 PageNo = 3;
  63. int32 PageSize = 4;
  64. }
  65. }