group.proto 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. syntax = "proto3";
  2. import "public.proto";
  3. package pcds.group.v1;
  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 PerPage = 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 CurrentPage = 3;
  55. int32 PerPage = 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. }