group.proto 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. syntax = "proto3";
  2. import "public.proto";
  3. package group;
  4. /*
  5. * Group/群组 服务
  6. */
  7. service Group{
  8. rpc GetGroupListForStudio (GroupListRequest) returns (GroupListReply){}
  9. rpc GetGroup (GroupRequest) returns (GroupReply){}
  10. rpc SetGroup (GroupRequest) returns (GroupReply){}
  11. rpc AddGroup (GroupRequest) returns (GroupReply){}
  12. rpc DelGroup (GroupRequest) returns (GroupReply){}
  13. rpc AddMember (User) returns (MemberReply){}
  14. rpc RemoveMember (User) returns (MemberReply){}
  15. rpc GetMemberListForGroup (GroupListRequest) returns (GroupMemberListReply){}
  16. }
  17. message GroupListRequest{
  18. string Id = 1;
  19. string Search = 3;
  20. EnumAllowingSearch SearchCol = 4;
  21. int32 CurrentPage = 5; //current page number
  22. int32 PageSize = 6; //The number of items to be shown per page.
  23. EnumAllowingOrderby OrderBy = 7;
  24. bool Desc = 8;
  25. }
  26. enum EnumAllowingSearch{
  27. EAS_NAME = 0;
  28. }
  29. enum EnumAllowingOrderby{
  30. EAO_CREATE_AT = 0;
  31. EAO_NAME = 1;
  32. }
  33. message GroupRequest{
  34. string Id = 1;
  35. string Name = 2;
  36. string Summary = 3;
  37. string StudioId = 5;
  38. string EditorId = 52;
  39. EnumPublicity Publicity = 53;
  40. string CreatedAt = 101;
  41. string UpdatedAt = 102;
  42. }
  43. message GroupReply{
  44. bool ok = 1;
  45. string message = 2;
  46. GroupRequest data = 3;
  47. }
  48. message GroupListReply{
  49. bool ok = 1;
  50. string message = 2;
  51. message data{
  52. repeated GroupRequest rows = 1;
  53. int32 Count = 2;
  54. int32 PageNo = 3;
  55. int32 PageSize = 4;
  56. }
  57. }
  58. message MemberReply{
  59. bool ok = 1;
  60. string message = 2;
  61. User data = 3;
  62. }
  63. message GroupMemberListReply{
  64. bool ok = 1;
  65. string message = 2;
  66. message data{
  67. repeated User rows = 1;
  68. }
  69. }