common.proto 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. // 1 官网购买VIP 2 应用商店购买 3 pmp 后台 4 tg 购买
  38. enum PayOrderType {
  39. PayOrderTypeUnknown = 0;
  40. PayOrderTypeOw = 1; // 官网购买VIP
  41. PayOrderTypeAppStore = 2; // 手机应用商店购买
  42. PayOrderTypePmp = 3; // pmp 后台购买
  43. PayOrderTypeTg = 4; // tg 购买
  44. }
  45. // 1 跳转支付地址 2 显示QrCode 3 其他
  46. enum PayShowType {
  47. PayShowTypeUnknown = 0;
  48. PayShowTypeUrl = 1;
  49. PayShowTypeQrCode = 2;
  50. }
  51. message Empty {}
  52. message Int64SelectController {
  53. repeated int64 values = 1;
  54. bool exclude = 2;
  55. }
  56. message IntSelectController {
  57. repeated int32 values = 1;
  58. bool exclude = 2;
  59. }
  60. message StringSelectController {
  61. repeated string values = 1;
  62. bool exclude = 2;
  63. }
  64. message Page {
  65. message OrderItem {
  66. string column = 1;
  67. bool asc = 2;
  68. bool isFunc = 3;
  69. }
  70. int64 pageNo = 1;
  71. int64 pageSize = 2;
  72. int64 startTime = 3;
  73. int64 endTime = 4;
  74. repeated OrderItem sortBy = 5;
  75. bool ignoreTotal = 6; // 忽略总条数
  76. bool ignoreStat = 7; // 忽略总条数
  77. bool ignoreList = 8; // 忽略列表
  78. repeated int64 ids = 9;
  79. repeated string groupBy = 10;
  80. }
  81. message CommonResult {
  82. CommonResultCode code = 1;
  83. string msg = 2;
  84. }
  85. message BaseReq {
  86. int64 timeZoneOffset = 1;
  87. string lan = 2;
  88. }
  89. message DeleteIdResp { repeated int64 failedIds = 1; }
  90. message Ids { repeated int64 ids = 1; }
  91. message Request {}
  92. message Response { string msg = 1; }
  93. message TransactionOperation {
  94. string table = 1; // 表名
  95. string operate = 2; // delete,insert,update
  96. string data = 3; // json格式
  97. }
  98. message TransactionReq { repeated TransactionOperation transactions = 1; }