user.proto 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. syntax = "proto3";
  2. package gorpc;
  3. option go_package = "git.goio.dev/pb/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. }
  103. message DeviceListReq {
  104. Page page = 1;
  105. DeviceVo vo = 2;
  106. repeated string productCodes = 3; // 产品code
  107. repeated int64 excludeIds = 4; // 排除的ID
  108. repeated string dateRange = 5; // 日期范围
  109. int64 createStartTime = 6; // 创建开始时间
  110. int64 createEndTime = 7; // 创建结束时间
  111. }
  112. message DeviceListRes {
  113. int64 total = 1;
  114. repeated DeviceVo list = 2;
  115. }
  116. message UserAppConfigVo {
  117. int64 id = 1;
  118. string deviceId = 2;
  119. string key = 3;
  120. string value = 4;
  121. Status status = 5;
  122. int64 createTime = 6;
  123. int64 updateTime = 7;
  124. }
  125. message UserAppConfigGetReq { UserAppConfigVo vo = 1; }
  126. message UserAppConfigListReq {
  127. Page page = 1;
  128. UserAppConfigVo vo = 2;
  129. }
  130. message UserAppConfigListRes {
  131. int64 total = 1;
  132. repeated UserAppConfigVo list = 2;
  133. }
  134. // 用户模块
  135. service GoUserClient {
  136. rpc Ping(Request) returns (Response);
  137. // 用户app配置管理(ring)
  138. rpc UserAppConfigAdd(UserAppConfigVo) returns (UserAppConfigVo);
  139. rpc UserAppConfigUpdate(UserAppConfigVo) returns (UserAppConfigVo);
  140. rpc UserAppConfigDel(Ids) returns (Empty);
  141. rpc UserAppConfigGet(UserAppConfigGetReq) returns (UserAppConfigVo);
  142. rpc UserAppConfigList(UserAppConfigListReq) returns (UserAppConfigListRes);
  143. // 设备管理
  144. rpc DeviceAdd(DeviceVo) returns (DeviceVo);
  145. rpc DeviceUpdate(DeviceVo) returns (DeviceVo);
  146. rpc DeviceDel(Ids) returns (Empty);
  147. rpc DeviceGet(DeviceVo) returns (DeviceVo);
  148. rpc DeviceList(DeviceListReq) returns (DeviceListRes);
  149. // Account
  150. rpc AccountAdd(AccountVo) returns (AccountVo);
  151. rpc AccountUpdate(AccountVo) returns (AccountVo);
  152. rpc AccountDel(Ids) returns (Empty);
  153. rpc AccountGet(AccountVo) returns (AccountVo);
  154. rpc AccountList(AccountListReq) returns (AccountListResp);
  155. // AccountDevice
  156. rpc AccountDeviceAdd(AccountDeviceVo) returns (AccountDeviceVo);
  157. rpc AccountDeviceUpdate(AccountDeviceVo) returns (AccountDeviceVo);
  158. rpc AccountDeviceDel(Ids) returns (Empty);
  159. rpc AccountDeviceGet(AccountDeviceVo) returns (AccountDeviceVo);
  160. rpc AccountDeviceList(AccountDeviceListReq) returns (AccountDeviceListResp);
  161. }