common.proto 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. syntax = "proto3";
  2. package gorpc;
  3. option go_package = "code.clickto.dev/nomo-server/go-service-pb/client";
  4. import "pb/constant.proto";
  5. // 根据需要增加状态
  6. enum CommonResultCode {
  7. Success = 0;
  8. }
  9. enum Status {
  10. UnknownStatus = 0;
  11. StatusValid = 1;
  12. StatusInValid = 2;
  13. StatusDefault = 9;
  14. }
  15. enum BoolInt {
  16. BoolIntUnknown = 0;
  17. BoolIntTrue = 1;
  18. BoolIntFalse = 2;
  19. }
  20. enum UserType {
  21. UserTypeUnknown = 0;
  22. UserTypeDevice = 1;
  23. UserTypeAccount= 2;
  24. }
  25. message Empty {}
  26. message Int64SelectController {
  27. repeated int64 values = 1;
  28. bool exclude = 2;
  29. }
  30. message IntSelectController {
  31. repeated int32 values = 1;
  32. bool exclude = 2;
  33. }
  34. message StringSelectController {
  35. repeated string values = 1;
  36. bool exclude = 2;
  37. }
  38. message Page {
  39. message OrderItem {
  40. string column = 1;
  41. bool asc = 2;
  42. bool isFunc = 3;
  43. }
  44. int64 pageNo = 1;
  45. int64 pageSize = 2;
  46. int64 startTime = 3;
  47. int64 endTime = 4;
  48. repeated OrderItem sortBy = 5;
  49. bool ignoreTotal = 6; // 忽略总条数
  50. bool ignoreStat = 7; // 忽略总条数
  51. bool ignoreList = 8; // 忽略列表
  52. repeated int64 ids = 9;
  53. repeated string groupBy = 10;
  54. }
  55. message CommonResult {
  56. CommonResultCode code = 1;
  57. string msg = 2;
  58. }
  59. message BaseReq {
  60. int64 timeZoneOffset = 1;
  61. string lan = 2;
  62. }
  63. message DeleteIdResp { repeated int64 failedIds = 1; }
  64. message Ids { repeated int64 ids = 1; }
  65. message Request {}
  66. message Response { string msg = 1; }
  67. message TransactionOperation {
  68. string table = 1; // 表名
  69. string operate = 2; // delete,insert,update
  70. string data = 3; // json格式
  71. }
  72. message TransactionReq { repeated TransactionOperation transactions = 1; }