channel.proto 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. syntax = "proto3"
  2. import "public.proto"
  3. /*
  4. * channel/版本 服务
  5. */
  6. service Channel{
  7. rpc GetChannelListForChannel (ChannelListRequest) returns (ChannelListReply){}
  8. rpc GetChannel (ChannelRequest) returns (ChannelReply){}
  9. rpc SetChannel (ChannelRequest) returns (ChannelReply){}
  10. rpc AddChannel (ChannelRequest) returns (ChannelReply){}
  11. rpc DelChannel (ChannelRequest) returns (ChannelReply){}
  12. }
  13. message ChannelListRequest{
  14. string Id = 1;
  15. string Search = 3;
  16. EnumAllowingSearch SearchCol = 4;
  17. int32 PageNo = 5;
  18. int32 PageSize = 6;
  19. EnumAllowingOrderby OrderBy = 7;
  20. bool Desc = 8;
  21. }
  22. enum EnumAllowingSearch{
  23. EAS_NAME = 0;
  24. }
  25. enum EnumAllowingOrderby{
  26. EAO_CREATE_AT = 0;
  27. EAO_NAME = 1;
  28. }
  29. enum EnumChannelType{
  30. ECT_TRANSLATION = 0;
  31. ECT_ORIGINAL = 1;
  32. ECT_NISSAYA = 2;
  33. ECT_COMMENTRAY = 3;
  34. ECT_GENERAL = 4;
  35. }
  36. message ChannelRequest{
  37. string Id = 1;
  38. string Name = 2;
  39. string Summary = 3;
  40. EnumChannelType ChannelType = 4;
  41. string StudioId = 5;
  42. string Lang = 51;
  43. string EditorId = 52;
  44. EnumPublicity Publicity = 53;
  45. string CreatedAt = 101;
  46. string UpdatedAt = 102;
  47. }
  48. message ChannelReply{
  49. bool ok = 1;
  50. string message = 2;
  51. ChannelRequest data = 3;
  52. }
  53. message ChannelListReply{
  54. bool ok = 1;
  55. string message = 2;
  56. message data{
  57. repeated ChannelRequest rows = 1;
  58. int32 Count = 2;
  59. int32 PageNo = 3;
  60. int32 PageSize = 4;
  61. }
  62. }