course.proto 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. syntax = "proto3"
  2. service Course{
  3. rpc getCourseListForStudio (CourseListRequest) returns (CourseListReply){}
  4. rpc getCourseListForCourse (CourseListRequest) returns (CourseListReply){}
  5. rpc getCourse (CourseRequest) returns (CourseReply){}
  6. rpc setCourse (CourseRequest) returns (CourseReply){}
  7. rpc addCourse (CourseRequest) returns (CourseReply){}
  8. rpc delCourse (CourseRequest) returns (CourseReply){}
  9. }
  10. message CourseListRequest{
  11. string Id = 1;
  12. string Search = 3;
  13. EnumAllowingSearch SearchCol = 4;
  14. int32 PageNo = 5;
  15. int32 PageSize = 6;
  16. string OrderBy = 7;
  17. bool Desc = 8;
  18. }
  19. enum EnumAllowingSearch{
  20. EAS_TITLE = 0;
  21. }
  22. enum EnumAllowingOrderby{
  23. EAO_START_AT = 0;
  24. EAO_TITLE = 1;
  25. }
  26. message CourseRequest{
  27. string Id = 1;
  28. string Title = 2;
  29. string Subtitle = 3;
  30. string Summary = 4;
  31. string Cover = 5;
  32. string Content = 6;
  33. string Start = 7;
  34. string End = 8;
  35. string CreatedAt = 9;
  36. string UpdatedAt = 10;
  37. }
  38. message CourseReply{
  39. bool ok = 1;
  40. string message = 2;
  41. CourseRequest data = 3;
  42. }
  43. message CourseListReply{
  44. bool ok = 1;
  45. string message = 2;
  46. message data{
  47. message rows {
  48. string Id = 1;
  49. string Title = 2;
  50. string Subtitle = 3;
  51. string Summary = 4;
  52. date Start = 5;
  53. date End = 6;
  54. string Cover = 7;
  55. int32 Children = 8;
  56. };
  57. int32 Count = 2;
  58. int32 PageNo = 3;
  59. int32 PageSize = 4;
  60. }
  61. }