user.proto 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. syntax = "proto3";
  2. package gorpc;
  3. option go_package = "code.clickto.dev/nomo-server/go-service-pb/client";
  4. import "pb/common.proto";
  5. // Account
  6. message AccountVo {
  7. int64 id = 1; // 主键ID
  8. string userUuid = 2; // 用户UUID
  9. string productCode = 3; // 产品ID
  10. string username = 4; // 用户名
  11. string password = 5; // 密码
  12. string accountKey = 6; // 账号KEY
  13. string accountPassword = 7; // 账号密码
  14. int64 accountType = 8; // 账号类型
  15. int64 registMode = 9; // 注册方式
  16. string provider = 10; // 授权登录标识
  17. BoolInt whitelistUser = 11; // 白名单用户
  18. BoolInt activated = 12; // 是否激活
  19. string config = 13; // 配置
  20. Status status = 14; // 状态
  21. string avatar = 15; // 头像
  22. string area = 16; // 指定地区
  23. string remark = 17; // 备注
  24. string deviceId = 18; // 设备ID
  25. string platform = 19; // 平台
  26. string channel = 20; // 渠道
  27. string deviceModel = 21; // 设备型号
  28. string deviceOs = 22; // 设备系统
  29. int64 timezone = 23; // 时区
  30. string lang = 24; // 语言
  31. string ip = 25; // IP
  32. string country = 26; // 国家
  33. string province = 27; // 省份
  34. string city = 28; // 城市
  35. string isp = 29; // ISP
  36. int64 appVer = 30; // 产品版本号
  37. int64 appRuntimeCode = 31; // 产品运行码
  38. int64 createTime = 32; // 创建时间
  39. int64 updateTime = 33; // 更新时间
  40. string version = 34; // 数据版本
  41. string sessionId = 35; // 登录凭证
  42. int64 sessionCreateTime = 36; // 凭证创建时间
  43. }
  44. message AccountListReq {
  45. Page page = 1;
  46. AccountVo vo = 2;
  47. repeated string productCodes = 3; // 产品code
  48. repeated int64 excludeIds = 4; // 排除的ID
  49. }
  50. message AccountListResp {
  51. int64 total = 1;
  52. repeated AccountVo list = 2;
  53. }
  54. // AccountDevice
  55. message AccountDeviceVo {
  56. int64 id = 1;
  57. int64 accountId = 2; // 用户ID
  58. int64 deviceId = 3; // 设备ID
  59. string sessionId = 4; // 登录凭证
  60. int64 sessionCreateTime = 5; // 凭证创建时间
  61. int64 updateTime = 6;
  62. int64 createTime = 7;
  63. }
  64. message AccountDeviceListReq {
  65. Page page = 1;
  66. AccountDeviceVo vo = 2;
  67. repeated int64 excludeIds = 3; // 排除的ID
  68. }
  69. message AccountDeviceListResp {
  70. int64 total = 1;
  71. repeated AccountDeviceVo list = 2;
  72. }
  73. message DeviceVo {
  74. int64 id = 1;
  75. string userUuid = 2;
  76. string productCode = 3;
  77. string deviceId = 4;
  78. string accountKey = 5;
  79. string accountPassword = 6;
  80. string platform = 7;
  81. string channel = 8;
  82. string referChannel = 9;
  83. string deviceModel = 10;
  84. string deviceOs = 11;
  85. int64 timezone = 12;
  86. string lang = 13;
  87. int64 appVer = 14;
  88. string ip = 15;
  89. string country = 16;
  90. string province = 17;
  91. string city = 18;
  92. string isp = 19;
  93. int64 createTime = 20;
  94. int64 updateTime = 21;
  95. Status status = 22;
  96. string refer = 23;
  97. int64 whitelistUser = 24; // 白名单用户 1正常用户 2: 白名单用户
  98. int64 testUser = 25; // 测试用户 1正常用户 2: 测试用户
  99. string mockCountry = 26; // 指定国家
  100. string mockApi = 27; // 指定API
  101. string mockRouter = 28; // 指定路由
  102. string referSubChannel = 29;
  103. }
  104. message DeviceListReq {
  105. Page page = 1;
  106. DeviceVo vo = 2;
  107. repeated string productCodes = 3; // 产品code
  108. repeated int64 excludeIds = 4; // 排除的ID
  109. repeated string dateRange = 5; // 日期范围
  110. int64 createStartTime = 6; // 创建开始时间
  111. int64 createEndTime = 7; // 创建结束时间
  112. }
  113. message DeviceListRes {
  114. int64 total = 1;
  115. repeated DeviceVo list = 2;
  116. }
  117. message UserAppConfigVo {
  118. int64 id = 1;
  119. string deviceId = 2;
  120. string key = 3;
  121. string value = 4;
  122. Status status = 5;
  123. int64 createTime = 6;
  124. int64 updateTime = 7;
  125. }
  126. message UserAppConfigGetReq { UserAppConfigVo vo = 1; }
  127. message UserAppConfigListReq {
  128. Page page = 1;
  129. UserAppConfigVo vo = 2;
  130. }
  131. message UserAppConfigListRes {
  132. int64 total = 1;
  133. repeated UserAppConfigVo list = 2;
  134. }
  135. // 用户模块
  136. service GoUserClient {
  137. rpc Ping(Request) returns (Response);
  138. // 用户app配置管理(ring)
  139. rpc UserAppConfigAdd(UserAppConfigVo) returns (UserAppConfigVo);
  140. rpc UserAppConfigUpdate(UserAppConfigVo) returns (UserAppConfigVo);
  141. rpc UserAppConfigDel(Ids) returns (Empty);
  142. rpc UserAppConfigGet(UserAppConfigGetReq) returns (UserAppConfigVo);
  143. rpc UserAppConfigList(UserAppConfigListReq) returns (UserAppConfigListRes);
  144. // 设备管理
  145. rpc DeviceAdd(DeviceVo) returns (DeviceVo);
  146. rpc DeviceUpdate(DeviceVo) returns (DeviceVo);
  147. rpc DeviceDel(Ids) returns (Empty);
  148. rpc DeviceGet(DeviceVo) returns (DeviceVo);
  149. rpc DeviceList(DeviceListReq) returns (DeviceListRes);
  150. // Account
  151. rpc AccountAdd(AccountVo) returns (AccountVo);
  152. rpc AccountUpdate(AccountVo) returns (AccountVo);
  153. rpc AccountDel(Ids) returns (Empty);
  154. rpc AccountGet(AccountVo) returns (AccountVo);
  155. rpc AccountList(AccountListReq) returns (AccountListResp);
  156. // AccountDevice
  157. rpc AccountDeviceAdd(AccountDeviceVo) returns (AccountDeviceVo);
  158. rpc AccountDeviceUpdate(AccountDeviceVo) returns (AccountDeviceVo);
  159. rpc AccountDeviceDel(Ids) returns (Empty);
  160. rpc AccountDeviceGet(AccountDeviceVo) returns (AccountDeviceVo);
  161. rpc AccountDeviceList(AccountDeviceListReq) returns (AccountDeviceListResp);
  162. }