common.proto 1.5 KB

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