common.proto 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. message Empty {}
  46. message Int64SelectController {
  47. repeated int64 values = 1;
  48. bool exclude = 2;
  49. }
  50. message IntSelectController {
  51. repeated int32 values = 1;
  52. bool exclude = 2;
  53. }
  54. message StringSelectController {
  55. repeated string values = 1;
  56. bool exclude = 2;
  57. }
  58. message Page {
  59. message OrderItem {
  60. string column = 1;
  61. bool asc = 2;
  62. bool isFunc = 3;
  63. }
  64. int64 pageNo = 1;
  65. int64 pageSize = 2;
  66. int64 startTime = 3;
  67. int64 endTime = 4;
  68. repeated OrderItem sortBy = 5;
  69. bool ignoreTotal = 6; // 忽略总条数
  70. bool ignoreStat = 7; // 忽略总条数
  71. bool ignoreList = 8; // 忽略列表
  72. repeated int64 ids = 9;
  73. repeated string groupBy = 10;
  74. }
  75. message CommonResult {
  76. CommonResultCode code = 1;
  77. string msg = 2;
  78. }
  79. message BaseReq {
  80. int64 timeZoneOffset = 1;
  81. string lan = 2;
  82. }
  83. message DeleteIdResp { repeated int64 failedIds = 1; }
  84. message Ids { repeated int64 ids = 1; }
  85. message Request {}
  86. message Response { string msg = 1; }
  87. message TransactionOperation {
  88. string table = 1; // 表名
  89. string operate = 2; // delete,insert,update
  90. string data = 3; // json格式
  91. }
  92. message TransactionReq { repeated TransactionOperation transactions = 1; }