school_disable.proto 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. syntax = "proto3";
  2. package api.user.v2;
  3. import "google/api/annotations.proto";
  4. import "validate/validate.proto";
  5. option go_package = "w303a/server/apis/user/v2;v2";
  6. option java_multiple_files = true;
  7. option java_package = "apis.user.v2";
  8. service SchoolDisable {
  9. // 手表获取上课禁用
  10. rpc GetWristwatchSchoolDisable (GetWristwatchSchoolDisableRequest) returns (GetWristwatchSchoolDisableResponse) {
  11. option(google.api.http) = {
  12. get: "/apis/v2/userctx/user/child/school-disable/wristwatch/get"
  13. };
  14. };
  15. // 获取上课禁用
  16. rpc GetSchoolDisable (GetSchoolDisableRequest) returns (GetSchoolDisableResponse) {
  17. option(google.api.http) = {
  18. get: "/apis/v2/userctx/user/child/school-disable/get"
  19. };
  20. };
  21. // 创建上课禁用
  22. rpc CreateSchoolDisable (CreateSchoolDisableRequest) returns (CreateSchoolDisableResponse) {
  23. option(google.api.http) = {
  24. post: "/apis/v2/userctx/user/child/school-disable/create"
  25. body: "*"
  26. };
  27. };
  28. // 更新上课禁用
  29. rpc UpdateSchoolDisable (UpdateSchoolDisableRequest) returns (UpdateSchoolDisableResponse) {
  30. option(google.api.http) = {
  31. post: "/apis/v2/userctx/user/child/school-disable/update"
  32. body: "*"
  33. };
  34. };
  35. // 删除上课禁用
  36. rpc DeleteSchoolDisable (DeleteSchoolDisableRequest) returns (DeleteSchoolDisableResponse) {
  37. option(google.api.http) = {
  38. get: "/apis/v2/userctx/user/child/school-disable/delete"
  39. };
  40. };
  41. }
  42. // 手表获取上课禁用 Request
  43. message GetWristwatchSchoolDisableRequest {
  44. string ticket = 2 [(validate.rules).string.min_len = 1];
  45. }
  46. // 手表获取上课禁用 Response
  47. message GetWristwatchSchoolDisableResponse {
  48. message SchoolDisable {
  49. string cid = 1;
  50. string repeats = 2;
  51. string startTime = 3;
  52. string endTime = 4;
  53. bool status = 5;
  54. int64 id = 6;
  55. }
  56. repeated SchoolDisable schoolDisables = 1;
  57. }
  58. // 获取上课禁用 Request
  59. message GetSchoolDisableRequest {
  60. string cid = 1 [(validate.rules).string.uuid = true, (validate.rules).string.min_len = 1];
  61. }
  62. // 获取上课禁用 Response
  63. message GetSchoolDisableResponse {
  64. message SchoolDisable {
  65. string cid = 1;
  66. string repeats = 2;
  67. string startTime = 3;
  68. string endTime = 4;
  69. bool status = 5;
  70. int64 id = 6;
  71. }
  72. repeated SchoolDisable schoolDisables = 1;
  73. }
  74. // 创建上课禁用 Request
  75. message CreateSchoolDisableRequest {
  76. string cid = 1 [(validate.rules).string.uuid = true];
  77. string repeats = 2;
  78. string startTime = 3 [(validate.rules).string.min_len = 1];
  79. string endTime = 4 [(validate.rules).string.min_len = 1];
  80. bool status = 5;
  81. }
  82. // 创建上课禁用 Response
  83. message CreateSchoolDisableResponse {
  84. int64 id = 1 [(validate.rules).int64.gt = 0];
  85. }
  86. // 更新上课禁用 Request
  87. message UpdateSchoolDisableRequest {
  88. int64 id = 1 [(validate.rules).int64.gt = 0];
  89. string cid = 2 [(validate.rules).string.uuid = true, (validate.rules).string.min_len = 1];
  90. string repeats = 3;
  91. string startTime = 4 [(validate.rules).string.min_len = 1];
  92. string endTime = 5 [(validate.rules).string.min_len = 1];
  93. bool status = 6;
  94. }
  95. // 更新上课禁用 Response
  96. message UpdateSchoolDisableResponse {}
  97. // 删除上课禁用 Request
  98. message DeleteSchoolDisableRequest {
  99. int64 id = 1 [(validate.rules).int64.gt = 0];
  100. }
  101. // 删除上课禁用 Response
  102. message DeleteSchoolDisableResponse {}