common.proto 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. enum AuthType {
  26. AuthTypeUnknown = 0;
  27. AuthTypeAuth = 1;
  28. AuthTypeCancel = 2;
  29. }
  30. enum UserLevel {
  31. UserLevelUnknown = 0;
  32. UserLevelTrial = 1;// 试用 1
  33. UserLevelFree = 2; // 免费 2
  34. UserLevelMember = 3; // 会员 3
  35. UserLevelInternal = 9999; // 内部 9999
  36. }
  37. message Empty {}
  38. message Int64SelectController {
  39. repeated int64 values = 1;
  40. bool exclude = 2;
  41. }
  42. message IntSelectController {
  43. repeated int32 values = 1;
  44. bool exclude = 2;
  45. }
  46. message StringSelectController {
  47. repeated string values = 1;
  48. bool exclude = 2;
  49. }
  50. message Page {
  51. message OrderItem {
  52. string column = 1;
  53. bool asc = 2;
  54. bool isFunc = 3;
  55. }
  56. int64 pageNo = 1;
  57. int64 pageSize = 2;
  58. int64 startTime = 3;
  59. int64 endTime = 4;
  60. repeated OrderItem sortBy = 5;
  61. bool ignoreTotal = 6; // 忽略总条数
  62. bool ignoreStat = 7; // 忽略总条数
  63. bool ignoreList = 8; // 忽略列表
  64. repeated int64 ids = 9;
  65. repeated string groupBy = 10;
  66. }
  67. message CommonResult {
  68. CommonResultCode code = 1;
  69. string msg = 2;
  70. }
  71. message BaseReq {
  72. int64 timeZoneOffset = 1;
  73. string lan = 2;
  74. }
  75. message DeleteIdResp { repeated int64 failedIds = 1; }
  76. message Ids { repeated int64 ids = 1; }
  77. message Request {}
  78. message Response { string msg = 1; }
  79. message TransactionOperation {
  80. string table = 1; // 表名
  81. string operate = 2; // delete,insert,update
  82. string data = 3; // json格式
  83. }
  84. message TransactionReq { repeated TransactionOperation transactions = 1; }