common.proto 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. message Empty {}
  21. message Int64SelectController {
  22. repeated int64 values = 1;
  23. bool exclude = 2;
  24. }
  25. message IntSelectController {
  26. repeated int32 values = 1;
  27. bool exclude = 2;
  28. }
  29. message StringSelectController {
  30. repeated string values = 1;
  31. bool exclude = 2;
  32. }
  33. message Page {
  34. message OrderItem {
  35. string column = 1;
  36. bool asc = 2;
  37. bool isFunc = 3;
  38. }
  39. int64 pageNo = 1;
  40. int64 pageSize = 2;
  41. int64 startTime = 3;
  42. int64 endTime = 4;
  43. repeated OrderItem sortBy = 5;
  44. bool ignoreTotal = 6; // 忽略总条数
  45. bool ignoreStat = 7; // 忽略总条数
  46. bool ignoreList = 8; // 忽略列表
  47. repeated int64 ids = 9;
  48. repeated string groupBy = 10;
  49. }
  50. message CommonResult {
  51. CommonResultCode code = 1;
  52. string msg = 2;
  53. }
  54. message BaseReq {
  55. int64 timeZoneOffset = 1;
  56. string lan = 2;
  57. }
  58. message DeleteIdResp { repeated int64 failedIds = 1; }
  59. message Ids { repeated int64 ids = 1; }
  60. message Request {}
  61. message Response { string msg = 1; }
  62. message TransactionOperation {
  63. string table = 1; // 表名
  64. string operate = 2; // delete,insert,update
  65. string data = 3; // json格式
  66. }
  67. message TransactionReq { repeated TransactionOperation transactions = 1; }