gorpc.proto 111 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659
  1. syntax = "proto3";
  2. package gorpc;
  3. option go_package = "./pb";
  4. enum RegisterMode {
  5. RegisterModeUnknown = 0;
  6. RegisterModeGuest = 1;
  7. RegisterModeApp = 2;
  8. RegisterModeWeb = 3;
  9. RegisterModePc = 4;
  10. RegisterModeInvalid = 9999;
  11. }
  12. // enum Provider {
  13. // ProviderUnknown = 0;
  14. // ProviderGoogle = 1;
  15. // ProviderApple = 2;
  16. // ProviderMeta = 3;
  17. // ProviderGithub = 4;
  18. // }
  19. // 根据需要增加状态
  20. enum CommonResultCode {
  21. Success = 0;
  22. }
  23. enum Status {
  24. UnknownStatus = 0;
  25. StatusValid = 1;
  26. StatusInValid = 2;
  27. StatusDefault = 9;
  28. }
  29. enum BoolInt {
  30. BoolIntUnknown = 0;
  31. BoolIntTrue = 1;
  32. BoolIntFalse = 2;
  33. }
  34. enum UserType {
  35. UserTypeUnknown = 0;
  36. UserTypeDevice = 1;
  37. UserTypeAccount= 2;
  38. }
  39. enum AuthType {
  40. AuthTypeUnknown = 0;
  41. AuthTypeAuth = 1;
  42. AuthTypeCancel = 2;
  43. }
  44. enum UserLevel {
  45. UserLevelUnknown = 0;
  46. UserLevelTrial = 1;// 试用 1
  47. UserLevelFree = 2; // 免费 2
  48. UserLevelMember = 3; // 会员 3
  49. UserLevelInternal = 9999; // 内部 9999
  50. }
  51. // 1 官网购买VIP 2 应用商店购买 3 pmp 后台 4 tg 购买
  52. enum PayOrderType {
  53. PayOrderTypeUnknown = 0;
  54. PayOrderTypeOw = 1; // 官网购买VIP
  55. PayOrderTypeAppStore = 2; // 手机应用商店购买
  56. PayOrderTypePmp = 3; // pmp 后台购买
  57. PayOrderTypeTg = 4; // tg 购买
  58. }
  59. // 1 跳转支付地址 2 显示QrCode 3 其他
  60. enum PayShowType {
  61. PayShowTypeUnknown = 0;
  62. PayShowTypeUrl = 1;
  63. PayShowTypeQrCode = 2;
  64. }
  65. message Empty {}
  66. message Int64SelectController {
  67. repeated int64 values = 1;
  68. bool exclude = 2;
  69. }
  70. message IntSelectController {
  71. repeated int32 values = 1;
  72. bool exclude = 2;
  73. }
  74. message StringSelectController {
  75. repeated string values = 1;
  76. bool exclude = 2;
  77. }
  78. message Page {
  79. message OrderItem {
  80. string column = 1;
  81. bool asc = 2;
  82. bool isFunc = 3;
  83. }
  84. int64 pageNo = 1;
  85. int64 pageSize = 2;
  86. int64 startTime = 3;
  87. int64 endTime = 4;
  88. repeated OrderItem sortBy = 5;
  89. bool ignoreTotal = 6; // 忽略总条数
  90. bool ignoreStat = 7; // 忽略总条数
  91. bool ignoreList = 8; // 忽略列表
  92. repeated int64 ids = 9;
  93. repeated string groupBy = 10;
  94. }
  95. message CommonResult {
  96. CommonResultCode code = 1;
  97. string msg = 2;
  98. }
  99. message BaseReq {
  100. int64 timeZoneOffset = 1;
  101. string lan = 2;
  102. }
  103. message DeleteIdResp { repeated int64 failedIds = 1; }
  104. message Ids { repeated int64 ids = 1; }
  105. message Request {}
  106. message Response { string msg = 1; }
  107. message TransactionOperation {
  108. string table = 1; // 表名
  109. string operate = 2; // delete,insert,update
  110. string data = 3; // json格式
  111. }
  112. message TransactionReq { repeated TransactionOperation transactions = 1; }
  113. message GameVo {
  114. int64 id = 1;
  115. string name = 2;
  116. string pkg = 3;
  117. string categories = 4;
  118. string icon = 5;
  119. string internal_icon = 6;
  120. string source_icon = 7;
  121. int64 status = 8;
  122. int64 state = 9;
  123. int64 enableRating = 10;
  124. int64 gameUpdateTime = 11;
  125. int64 gameBoostCount = 12;
  126. string gameBoostCountryCount = 13;
  127. int64 createTime = 14;
  128. int64 updateTime = 15;
  129. }
  130. message GameReq { GameVo vo = 1; }
  131. message GameListReq {
  132. Page page = 1;
  133. repeated string pkgs = 2;
  134. GameVo vo = 3;
  135. }
  136. message GameListRes {
  137. int64 total = 1;
  138. repeated GameVo list = 2;
  139. }
  140. message RelGameRankVo {
  141. int64 id = 1;
  142. int64 gameId = 2;
  143. int64 rankId = 3;
  144. int64 weight = 4;
  145. int64 createTime = 5;
  146. int64 updateTime = 6;
  147. }
  148. message RelGameRankReq { RelGameRankVo vo = 1; }
  149. message RelGameRankListReq {
  150. Page page = 1;
  151. RelGameRankVo vo = 2;
  152. }
  153. message RelGameRankListRes {
  154. int64 total = 1;
  155. repeated RelGameRankVo list = 2;
  156. }
  157. message RelGameVpnGroupVo {
  158. int64 id = 1;
  159. int64 gameId = 2;
  160. string productCode = 3;
  161. int64 vpnGroupId = 4;
  162. int64 status = 5;
  163. int64 createTime = 6;
  164. int64 updateTime = 7;
  165. }
  166. message RelGameVpnGroupReq { RelGameVpnGroupVo vo = 1; }
  167. message RelGameVpnGroupListReq {
  168. repeated int64 gameIds = 1;
  169. RelGameVpnGroupVo vo = 2;
  170. }
  171. message RelGameVpnGroupListRes {
  172. int64 total = 1;
  173. repeated RelGameVpnGroupVo list = 2;
  174. }
  175. message GameRedisHScanByNameReq {
  176. string name = 1;
  177. int64 cursor = 2;
  178. int64 count = 3;
  179. }
  180. message GameRedisHScanByNameResp {
  181. repeated int64 ids = 1;
  182. int64 cursor = 2;
  183. }
  184. message GameCustomerVo {
  185. int64 id = 1;
  186. string name = 2;
  187. string pkg = 3;
  188. string icon = 4;
  189. int64 createTime = 5;
  190. int64 updateTime = 6;
  191. }
  192. message GameCustomerListReq {
  193. Page page = 1;
  194. repeated string pkgs = 2;
  195. GameCustomerVo vo = 3;
  196. }
  197. message GameCustomerListRes {
  198. int64 total = 1;
  199. repeated GameCustomerVo list = 2;
  200. }
  201. message GameCustomerAddResp {
  202. GameCustomerVo vo = 1;
  203. bool ExistBoost = 2;
  204. }
  205. message GameCategoryVo {
  206. int64 id = 1;
  207. string code = 2;
  208. string name = 3;
  209. string described = 4;
  210. int64 createTime = 5;
  211. int64 updateTime = 6;
  212. }
  213. message GameCategoryReq { GameCategoryVo vo = 1; }
  214. message GameCategoryListReq {
  215. Page page = 1;
  216. GameCategoryVo vo = 3;
  217. }
  218. message GameCategoryListRes {
  219. int64 total = 1;
  220. repeated GameCategoryVo list = 2;
  221. }
  222. // 定义一个GameRank的属性字段
  223. message GameRankOption { bool showRanking = 1; }
  224. service GoGameClient {
  225. // 加速器游戏管理
  226. rpc GameAdd(GameVo) returns (GameVo);
  227. rpc GameUpdate(GameVo) returns (Empty);
  228. rpc GameDel(Ids) returns (Empty);
  229. rpc GameGet(GameReq) returns (GameVo);
  230. rpc GameList(GameListReq) returns (GameListRes);
  231. rpc GameAll(Request) returns (GameListRes);
  232. rpc GameRedisHScanByName(GameRedisHScanByNameReq)
  233. returns (GameRedisHScanByNameResp);
  234. // 游戏榜单关联关系
  235. rpc RelGameRankAdd(RelGameRankVo) returns (RelGameRankVo);
  236. rpc RelGameRankUpdate(RelGameRankVo) returns (Empty);
  237. rpc RelGameRankDel(Ids) returns (Empty);
  238. rpc RelGameRankGet(RelGameRankReq) returns (RelGameRankVo);
  239. rpc RelGameRankList(RelGameRankListReq) returns (RelGameRankListRes);
  240. // 游戏地域关联关系
  241. rpc RelGameVpnGroupAdd(RelGameVpnGroupVo) returns (RelGameVpnGroupVo);
  242. rpc RelGameVpnGroupUpdate(RelGameVpnGroupVo) returns (Empty);
  243. rpc RelGameVpnGroupDel(Ids) returns (Empty);
  244. rpc RelGameVpnGroupGet(RelGameVpnGroupReq) returns (RelGameVpnGroupVo);
  245. rpc RelGameVpnGroupList(RelGameVpnGroupListReq)
  246. returns (RelGameVpnGroupListRes);
  247. // 用户提交游戏
  248. rpc GameCustomerList(GameCustomerListReq) returns (GameCustomerListRes);
  249. rpc GameCustomerAdd(GameCustomerVo) returns (GameCustomerAddResp);
  250. rpc GameCustomerDel(Ids) returns (Empty);
  251. rpc GameCategoryAdd(GameCategoryVo) returns (GameCategoryVo);
  252. rpc GameCategoryUpdate(GameCategoryVo) returns (Empty);
  253. rpc GameCategoryDel(Ids) returns (Empty);
  254. rpc GameCategoryGet(GameCategoryReq) returns (GameCategoryVo);
  255. rpc GameCategoryList(GameCategoryListReq) returns (GameCategoryListRes);
  256. rpc GameCategoryAll(Request) returns (GameCategoryListRes);
  257. }
  258. message UserPayOrderVo { //用户支付订单表
  259. int64 id = 1; //主键ID,自增
  260. int64 userId = 2; //用户ID
  261. string productCode = 3; //产品Code
  262. string orderId = 4; //订单号
  263. string title = 5; //支付订单标题
  264. string country = 6;//用户国家
  265. string province = 7;//用户省份
  266. string city = 8;//用户城市
  267. string pkgName = 9;//包名
  268. string purchaseToken = 10 ;//支付token
  269. float amount = 11; //订单金额(美元)
  270. int64 channelPlanId = 12; //套餐ID
  271. float settleAmount = 13; //结算金额(美元)
  272. int64 currency = 14; //收款货币类型
  273. float currencyAmount = 15; //订单货币金额
  274. PayOrderType orderType = 16; //1 官网购买VIP 2 手机应用商店购买 3 pmp 后台 4 tg 购买
  275. BoolInt planOrderType = 17; //订单类型:1非订阅 或者 2 订阅
  276. string payType = 18; //支付方式:visa, wx, alipay, paypal, coinpal, applePay, googlePay
  277. string platform = 19; //支付平台
  278. string snNo = 20; //支付平台流水号
  279. string payUrl = 21; //支付平台生成的付款地址
  280. string paidAddress = 22; //支付地址
  281. int64 refundCount = 23; //退款次数
  282. float refundFee = 24; //退款金额
  283. string ip = 25; //IP地址
  284. string remark = 26; //订单说明,可选
  285. string state = 27; //订单流转状态
  286. string stateDesc = 28; //订单状态说明,每次更新订单状态时更新
  287. Status status = 29; //订单记录状态,1有效 2暂停
  288. int64 createTime = 30; //订单创建时间
  289. int64 updateTime = 31; //订单修改时间
  290. BoolInt isCurrentDevice = 32;
  291. PayShowType showType = 33; //1 跳转支付地址 2 显示QrCode 3 其他
  292. }
  293. message UserAuthLogVo { //用户授权日志表
  294. int64 id = 1; //自增ID
  295. string productCode = 2; //产品Code
  296. int64 userId = 3; //用户ID
  297. int64 beforeId = 4; //前一个授权记录ID
  298. BoolInt isCurrentService = 5; //最后一次有效套餐,退款级联不能设置true
  299. int64 servicePlanId = 6; //内部套餐ID
  300. int64 serviceChannelPlanId = 7; //渠道套餐ID
  301. string title = 8; //当前套餐标题
  302. string subTitle = 9; //当前套餐子标题
  303. string introduce = 10; //当前套餐说明
  304. string channelItemId = 11; //sku
  305. float orgPrice = 12; //原价
  306. float price = 13; //现价
  307. int64 currency = 14; //货币类型 1 美元
  308. BoolInt isSubscribe = 15; //是否是订阅类型 1非订阅 2订阅
  309. SubscribePeriodType subscribeType = 16; //订阅周期类型 1Day 2Week 3Month 4Year(仅当订阅类型为1时有效)
  310. int64 subscribePeriodValue = 17; //订阅周期值(仅当订阅类型为1时有效)
  311. UserLevel userLevel = 18; //会员等级
  312. int64 licenseDays = 19; //套餐天数
  313. int64 licenseMinutes = 20; //套餐分钟(设备活用仅适),不合并到账户中
  314. int64 deviceLimit = 21; //设备数量上限
  315. int64 speedLimit = 22; //速度上限100Kb
  316. int64 trafficLimit = 23; //流量上限
  317. int64 startTime = 24; //套餐开始时间
  318. int64 createTime = 25; //创建时间
  319. int64 updateTime = 26; //修改时间
  320. int64 createAt = 27; //授权人(创建)
  321. int64 updateAt = 28; //授权人(修改)
  322. Status status = 29; //记录状态 1有效 2无效
  323. AuthType authType = 30; //授权类型:1授权 2取消授权
  324. int64 userPayOrderId = 31; //支付订单ID
  325. }
  326. message UserAuthLogAddReq { UserAuthLogVo vo = 1; }
  327. message UserAuthLogAddResp { UserAuthLogVo vo = 1; }
  328. message UserAuthLogListReq {
  329. Page page = 1;
  330. UserAuthLogVo vo = 2;
  331. }
  332. message UserAuthLogListResp {
  333. int64 total = 1;
  334. repeated UserAuthLogVo list = 2;
  335. }
  336. message UserAuthLogGetReq { UserAuthLogVo vo = 1; }
  337. message UserAuthLogGetResp { UserAuthLogVo vo = 1; }
  338. message UserAuthLogDelReq { repeated int64 ids = 1; }
  339. message UserAuthLogUpdateReq { UserAuthLogVo vo = 1; }
  340. message UserAuthLogUpdateResp { UserAuthLogVo vo = 1; }
  341. message UserPayOrderAddReq { UserPayOrderVo vo = 1; }
  342. message UserPayOrderAddResp { UserPayOrderVo vo = 1; }
  343. message UserPayOrderListReq {
  344. Page page = 1;
  345. UserPayOrderVo vo = 2;
  346. }
  347. message UserPayOrderListResp {
  348. int64 total = 1;
  349. repeated UserPayOrderVo list = 2;
  350. }
  351. message UserPayOrderGetReq { UserPayOrderVo vo = 1; }
  352. message UserPayOrderGetResp { UserPayOrderVo vo = 1; }
  353. message UserPayOrderDelReq { repeated int64 ids = 1; }
  354. message UserPayOrderUpdateReq { UserPayOrderVo vo = 1; }
  355. message UserPayOrderUpdateResp { UserPayOrderVo vo = 1; }
  356. service GoPayClient {
  357. //UserAuthLog
  358. rpc UserAuthLogAdd(UserAuthLogAddReq) returns (UserAuthLogAddResp);
  359. rpc UserAuthLogList(UserAuthLogListReq) returns (UserAuthLogListResp);
  360. rpc UserAuthLogGet(UserAuthLogGetReq) returns (UserAuthLogGetResp);
  361. rpc UserAuthLogDel(UserAuthLogDelReq) returns (Empty);
  362. rpc UserAuthLogUpdate(UserAuthLogUpdateReq) returns (UserAuthLogUpdateResp);
  363. //UserPayOrder
  364. rpc UserPayOrderAdd(UserPayOrderAddReq) returns (UserPayOrderAddResp);
  365. rpc UserPayOrderList(UserPayOrderListReq) returns (UserPayOrderListResp);
  366. rpc UserPayOrderGet(UserPayOrderGetReq) returns (UserPayOrderGetResp);
  367. rpc UserPayOrderDel(UserPayOrderDelReq) returns (Empty);
  368. rpc UserPayOrderUpdate(UserPayOrderUpdateReq) returns (UserPayOrderUpdateResp);
  369. }
  370. // ServiceTypes
  371. message ServiceTypesVo {
  372. int64 id = 1; // ID
  373. string productCode = 2; // 产品标识
  374. string code = 3; // 权益类型标识
  375. string name = 4; // 权益类型名称
  376. int64 sort = 5; // 排序
  377. Status status = 6; // 状态 1启用 2禁用
  378. string remark = 7; // 备注
  379. int64 createTime = 8; // 创建时间
  380. int64 createAt = 9; // 创建者ID
  381. int64 updateTime = 10; // 更新时间
  382. int64 updateAt = 11; // 更新者ID
  383. }
  384. message ServiceTypesWithValueVo {
  385. ServiceTypesVo vo = 1;
  386. int64 value = 2;
  387. }
  388. message ServiceTypesGetReq { ServiceTypesVo vo = 1; }
  389. message ServiceTypesGetResp { ServiceTypesVo vo = 1; }
  390. message ServiceTypesAddReq { ServiceTypesVo vo = 1; }
  391. message ServiceTypesAddResp { ServiceTypesVo vo = 1; }
  392. message ServiceTypesUpdateReq { ServiceTypesVo vo = 1; }
  393. message ServiceTypesUpdateResp { ServiceTypesVo vo = 1; }
  394. message ServiceTypesDelReq { repeated int64 ids = 1; }
  395. message ServiceTypesListReq {
  396. Page page = 1;
  397. ServiceTypesVo vo = 2;
  398. repeated string productCodes = 3;
  399. repeated int64 excludeIds = 4;
  400. }
  401. message ServiceTypesListResp {
  402. int64 total = 1;
  403. repeated ServiceTypesVo list = 2;
  404. }
  405. // end ServiceTypes
  406. // ServiceBox
  407. message ServiceBoxVo {
  408. int64 id = 1; // ID
  409. string productCode = 2; // 产品标识
  410. string code = 3; // 权益包标识
  411. string name = 4; // 权益包名称
  412. int64 sort = 5; // 排序
  413. Status status = 6; // 状态 1启用 2禁用
  414. string remark = 7; // 备注
  415. int64 createTime = 8; // 创建时间
  416. int64 createAt = 9; // 创建者ID
  417. int64 updateTime = 10; // 更新时间
  418. int64 updateAt = 11; // 更新者ID
  419. }
  420. message ServiceBoxWithDetailsVo {
  421. ServiceBoxVo serviceBox = 1;
  422. repeated ServiceTypesWithValueVo serviceTypes = 2;
  423. }
  424. message ServiceBoxWithDurationVo {
  425. ServiceBoxVo serviceBox = 1;
  426. int64 licenseDurationDay = 2;
  427. int64 licenseDurationMinutes = 3;
  428. BoolInt isMaster = 4;
  429. int64 bindId = 5;
  430. }
  431. message ServiceBoxGetReq { ServiceBoxVo vo = 1; }
  432. message ServiceBoxGetResp { ServiceBoxVo vo = 1; }
  433. message ServiceBoxGetWithDetailsReq {
  434. ServiceBoxVo vo = 1;
  435. }
  436. message ServiceBoxGetWithDetailsResp {
  437. ServiceBoxVo serviceBox = 1;
  438. repeated ServiceTypesWithValueVo serviceTypes = 2;
  439. }
  440. message ServiceBoxAddReq { ServiceBoxVo vo = 1; }
  441. message ServiceBoxAddResp { ServiceBoxVo vo = 1; }
  442. message ServiceBoxAddWithDetailsReq {
  443. ServiceBoxVo serviceBox = 1;
  444. repeated ServiceTypesWithValueVo serviceTypes = 2;
  445. }
  446. message ServiceBoxAddWithDetailsResp {
  447. ServiceBoxVo serviceBox = 1;
  448. repeated ServiceTypesWithValueVo serviceTypes = 2;
  449. }
  450. message ServiceBoxUpdateReq { ServiceBoxVo vo = 1; }
  451. message ServiceBoxUpdateResp { ServiceBoxVo vo = 1; }
  452. message ServiceBoxUpdateWithDetailsReq {
  453. ServiceBoxVo serviceBox = 1;
  454. repeated ServiceTypesWithValueVo serviceTypes = 2;
  455. }
  456. message ServiceBoxUpdateWithDetailsResp {
  457. ServiceBoxVo serviceBox = 1;
  458. repeated ServiceTypesWithValueVo serviceTypes = 2;
  459. }
  460. message ServiceBoxDelReq { repeated int64 ids = 1; }
  461. message ServiceBoxListReq {
  462. Page page = 1;
  463. ServiceBoxVo vo = 2;
  464. repeated string productCodes = 3;
  465. repeated int64 excludeIds = 4;
  466. }
  467. message ServiceBoxListResp {
  468. int64 total = 1;
  469. repeated ServiceBoxVo list = 2;
  470. }
  471. // end ServiceBox
  472. // ServiceBoxTypes
  473. message ServiceBoxTypesVo {
  474. int64 id = 1; // ID
  475. int64 serviceBoxId = 2; // 权益包ID
  476. int64 serviceTypeId = 3; // 权益类型ID
  477. int64 serviceValue = 4; // 权益值 根据不同的 serviceTypeId,这里的值的含义不同
  478. int64 createTime = 5; // 创建时间
  479. int64 createAt = 6; // 创建者ID
  480. int64 updateTime = 7; // 更新时间
  481. int64 updateAt = 8; // 更新者ID
  482. }
  483. message ServiceBoxTypesGetReq { ServiceBoxTypesVo vo = 1; }
  484. message ServiceBoxTypesGetResp { ServiceBoxTypesVo vo = 1; }
  485. message ServiceBoxTypesAddReq { ServiceBoxTypesVo vo = 1; }
  486. message ServiceBoxTypesAddResp { ServiceBoxTypesVo vo = 1; }
  487. message ServiceBoxTypesUpdateReq { ServiceBoxTypesVo vo = 1; }
  488. message ServiceBoxTypesUpdateResp { ServiceBoxTypesVo vo = 1; }
  489. message ServiceBoxTypesDelReq { repeated int64 ids = 1; }
  490. message ServiceBoxTypesListReq {
  491. Page page = 1;
  492. ServiceBoxTypesVo vo = 2;
  493. repeated int64 serviceBoxIds = 3;
  494. repeated int64 serviceTypeIds = 4;
  495. repeated int64 excludeIds = 5;
  496. int64 boxStatus = 6;
  497. }
  498. message ServiceBoxTypesListResp {
  499. int64 total = 1;
  500. repeated ServiceBoxTypesVo list = 2;
  501. }
  502. // end ServiceBoxTypes
  503. // SubscribePeriodType 订阅周期类型
  504. enum SubscribePeriodType {
  505. SubscribePeriodTypeUnknown = 0;
  506. SubscribePeriodTypeDay = 1;
  507. SubscribePeriodTypeWeek = 2;
  508. SubscribePeriodTypeMonth = 3;
  509. SubscribePeriodTypeYear = 4;
  510. }
  511. // ServicePlan
  512. message ServicePlanVo {
  513. int64 id = 1; // ID
  514. string productCode = 2; // 产品标识
  515. string code = 3; // 套餐code
  516. string name = 4; // 套餐名称
  517. string title = 5; // 标题(默认值,对外显示)
  518. string subTitle = 6; // 副标题(默认值,对外显示)
  519. string introduce = 7; // 简介(默认值,对外显示)
  520. string tag = 8; // 标签内容(默认值,对外显示)
  521. float orgPrice = 9; // 原价(默认值)
  522. float price = 10; // 现价(默认值)
  523. int64 currency = 11; // 价格货币类型(默认值)
  524. BoolInt recommend = 12; // 是否推荐套餐(默认值) 1推荐 2不推荐
  525. BoolInt isDefault = 13; // 是否默认套餐(默认值) 1默认 2不默认
  526. BoolInt subscribeType = 14; // 订阅类型 1订阅类型 2非订阅类型
  527. SubscribePeriodType subscribePeriodType = 15; // 订阅周期类型 1Day 2Week 3Month 4Year(仅当订阅类型为1时有效)
  528. int64 subscribePeriodValue = 16; // 订阅周期值(仅当订阅类型为1时有效)
  529. int64 priority = 17; // 套餐使用优先级
  530. int64 mergeRule = 18; // 套餐合并规则(规则一样的套餐包含的权益可以合并到一起)
  531. int64 sort = 19; // 排序
  532. Status status = 20; // 状态 1启用 2禁用
  533. string remark = 21; // 备注
  534. int64 createTime = 22; // 创建时间
  535. int64 createAt = 23; // 创建者ID
  536. int64 updateTime = 24; // 更新时间
  537. int64 updateAt = 25; // 更新者ID
  538. int64 tagType = 26; // 标签类型(与客户端约定)
  539. }
  540. message ServicePlanWithBoxesVo {
  541. ServicePlanVo servicePlan = 1;
  542. repeated ServiceBoxWithDurationVo serviceBoxes = 2;
  543. }
  544. message ServicePlanGetReq { ServicePlanVo vo = 1; }
  545. message ServicePlanGetResp { ServicePlanVo vo = 1; }
  546. message ServicePlanGetWithBoxesReq { ServicePlanVo vo = 1; }
  547. message ServicePlanGetWithBoxesResp {
  548. ServicePlanVo servicePlan = 1;
  549. repeated ServiceBoxWithDurationVo serviceBoxes = 2;
  550. }
  551. message ServicePlanAddReq { ServicePlanVo vo = 1; }
  552. message ServicePlanAddResp { ServicePlanVo vo = 1; }
  553. message ServicePlanAddWithBoxesReq {
  554. ServicePlanVo servicePlan = 1;
  555. repeated ServiceBoxWithDurationVo serviceBoxes = 2;
  556. }
  557. message ServicePlanAddWithBoxesResp {
  558. ServicePlanVo servicePlan = 1;
  559. repeated ServiceBoxWithDurationVo serviceBoxes = 2;
  560. }
  561. message ServicePlanUpdateReq { ServicePlanVo vo = 1; }
  562. message ServicePlanUpdateResp { ServicePlanVo vo = 1; }
  563. message ServicePlanUpdateWithBoxesReq {
  564. ServicePlanVo servicePlan = 1;
  565. repeated ServiceBoxWithDurationVo serviceBoxes = 2;
  566. }
  567. message ServicePlanUpdateWithBoxesResp {
  568. ServicePlanVo servicePlan = 1;
  569. repeated ServiceBoxWithDurationVo serviceBoxes = 2;
  570. }
  571. message ServicePlanDelReq { repeated int64 ids = 1; }
  572. message ServicePlanListReq {
  573. Page page = 1;
  574. ServicePlanVo vo = 2;
  575. repeated string productCodes = 3;
  576. repeated int64 excludeIds = 4;
  577. }
  578. message ServicePlanListResp {
  579. int64 total = 1;
  580. repeated ServicePlanVo list = 2;
  581. }
  582. message ServicePlanListWithBoxesReq {
  583. Page page = 1;
  584. ServicePlanVo vo = 2;
  585. repeated string productCodes = 3;
  586. repeated int64 excludeIds = 4;
  587. }
  588. message ServicePlanListWithBoxesResp {
  589. int64 total = 1;
  590. repeated ServicePlanWithBoxesVo list = 2;
  591. }
  592. // end ServicePlan
  593. // ServicePlanBoxes
  594. message ServicePlanBoxesVo {
  595. int64 id = 1; // ID
  596. int64 servicePlanId = 2; // 套餐ID
  597. int64 serviceBoxId = 3; // 权益包ID
  598. int64 licenseDurationDay = 4; // 权益包持续天数
  599. int64 licenseDurationMinutes = 5; // 权益包额外持续分钟数
  600. BoolInt isMaster = 6; // 是否主权益包 1是 2否
  601. int64 createTime = 7; // 创建时间
  602. int64 createAt = 8; // 创建者ID
  603. int64 updateTime = 9; // 更新时间
  604. int64 updateAt = 10; // 更新者ID
  605. }
  606. message ServicePlanBoxesGetReq { ServicePlanBoxesVo vo = 1; }
  607. message ServicePlanBoxesGetResp { ServicePlanBoxesVo vo = 1; }
  608. message ServicePlanBoxesAddReq { ServicePlanBoxesVo vo = 1; }
  609. message ServicePlanBoxesAddResp { ServicePlanBoxesVo vo = 1; }
  610. message ServicePlanBoxesUpdateReq { ServicePlanBoxesVo vo = 1; }
  611. message ServicePlanBoxesUpdateResp { ServicePlanBoxesVo vo = 1; }
  612. message ServicePlanBoxesDelReq { repeated int64 ids = 1; }
  613. message ServicePlanBoxesListReq {
  614. Page page = 1;
  615. ServicePlanBoxesVo vo = 2;
  616. repeated int64 servicePlanIds = 3;
  617. repeated int64 serviceBoxIds = 4;
  618. repeated int64 excludeIds = 5;
  619. int64 planStatus = 6;
  620. }
  621. message ServicePlanBoxesListResp {
  622. int64 total = 1;
  623. repeated ServicePlanBoxesVo list = 2;
  624. }
  625. // end ServicePlanBoxes
  626. // ServicePlanChannel
  627. message ServicePlanChannelVo {
  628. int64 id = 1; // ID
  629. string productCode = 2; // 产品标识
  630. string channel = 3; // 渠道标识
  631. string channelItemId = 4; // 套餐唯一ID或商店SKUID
  632. int64 servicePlanId = 5; // 套餐ID
  633. string title = 6; // 自定义标题(对外显示)
  634. string subTitle = 7; // 自定义副标题(对外显示)
  635. string introduce = 8; // 自定义简介(对外显示)
  636. string tag = 9; // 自定义标签内容(对外显示)
  637. float orgPrice = 10; // 在该渠道下的原价
  638. float price = 11; // 在该渠道下的现价
  639. int64 currency = 12; // 价格货币类型
  640. BoolInt recommend = 13; // 是否推荐商品(默认值) 1推荐 2不推荐
  641. BoolInt isDefault = 14; // 是否默认商品(默认值) 1默认 2不默认
  642. string displayPolicyConfig = 15; // 显示策略
  643. int64 sort = 16; // 排序
  644. Status status = 17; // 状态 1启用 2禁用
  645. string remark = 18; // 备注
  646. int64 createTime = 19; // 创建时间
  647. int64 createAt = 20; // 创建者ID
  648. int64 updateTime = 21; // 更新时间
  649. int64 updateAt = 22; // 更新者ID
  650. int64 tagType = 23; // 标签类型(与客户端约定)
  651. }
  652. message ServicePlanChannelGetReq { ServicePlanChannelVo vo = 1; }
  653. message ServicePlanChannelGetResp { ServicePlanChannelVo vo = 1; }
  654. message ServicePlanChannelAddReq { ServicePlanChannelVo vo = 1; }
  655. message ServicePlanChannelAddResp { ServicePlanChannelVo vo = 1; }
  656. message ServicePlanChannelUpdateReq { ServicePlanChannelVo vo = 1; }
  657. message ServicePlanChannelUpdateResp { ServicePlanChannelVo vo = 1; }
  658. message ServicePlanChannelDelReq { repeated int64 ids = 1; }
  659. message ServicePlanChannelListReq {
  660. Page page = 1;
  661. ServicePlanChannelVo vo = 2;
  662. repeated string productCodes = 3;
  663. repeated string channels = 4;
  664. repeated string channelItemIds = 5;
  665. repeated int64 servicePlanIds = 6;
  666. repeated int64 excludeIds = 7;
  667. }
  668. message ServicePlanChannelListResp {
  669. int64 total = 1;
  670. repeated ServicePlanChannelVo list = 2;
  671. }
  672. // end ServicePlanChannel
  673. service GoPlanClient {
  674. /** ServiceTypes Model */
  675. // ServiceTypesAdd
  676. rpc ServiceTypesAdd(ServiceTypesAddReq) returns (ServiceTypesAddResp);
  677. rpc ServiceTypesUpdate(ServiceTypesUpdateReq) returns (ServiceTypesUpdateResp);
  678. rpc ServiceTypesDel(ServiceTypesDelReq) returns (Empty);
  679. rpc ServiceTypesGet(ServiceTypesGetReq) returns (ServiceTypesGetResp);
  680. rpc ServiceTypesList(ServiceTypesListReq) returns (ServiceTypesListResp);
  681. /** ServiceBox Model */
  682. // ServiceBoxAdd
  683. rpc ServiceBoxAdd(ServiceBoxAddReq) returns (ServiceBoxAddResp);
  684. rpc ServiceBoxAddWithDetails(ServiceBoxAddWithDetailsReq) returns (ServiceBoxAddWithDetailsResp);
  685. rpc ServiceBoxUpdate(ServiceBoxUpdateReq) returns (ServiceBoxUpdateResp);
  686. rpc ServiceBoxUpdateWithDetails(ServiceBoxUpdateWithDetailsReq) returns (ServiceBoxUpdateWithDetailsResp);
  687. rpc ServiceBoxDel(ServiceBoxDelReq) returns (Empty);
  688. rpc ServiceBoxGet(ServiceBoxGetReq) returns (ServiceBoxGetResp);
  689. rpc ServiceBoxGetWithDetails(ServiceBoxGetWithDetailsReq) returns (ServiceBoxGetWithDetailsResp);
  690. rpc ServiceBoxList(ServiceBoxListReq) returns (ServiceBoxListResp);
  691. /** ServiceBoxTypes Model */
  692. // ServiceBoxTypesAdd
  693. rpc ServiceBoxTypesAdd(ServiceBoxTypesAddReq) returns (ServiceBoxTypesAddResp);
  694. rpc ServiceBoxTypesUpdate(ServiceBoxTypesUpdateReq) returns (ServiceBoxTypesUpdateResp);
  695. rpc ServiceBoxTypesDel(ServiceBoxTypesDelReq) returns (Empty);
  696. rpc ServiceBoxTypesGet(ServiceBoxTypesGetReq) returns (ServiceBoxTypesGetResp);
  697. rpc ServiceBoxTypesList(ServiceBoxTypesListReq) returns (ServiceBoxTypesListResp);
  698. /** ServicePlan Model */
  699. // ServicePlanAdd
  700. rpc ServicePlanAdd(ServicePlanAddReq) returns (ServicePlanAddResp);
  701. rpc ServicePlanAddWithBoxes(ServicePlanAddWithBoxesReq) returns (ServicePlanAddWithBoxesResp);
  702. rpc ServicePlanUpdate(ServicePlanUpdateReq) returns (ServicePlanUpdateResp);
  703. rpc ServicePlanUpdateWithBoxes(ServicePlanUpdateWithBoxesReq) returns (ServicePlanUpdateWithBoxesResp);
  704. rpc ServicePlanDel(ServicePlanDelReq) returns (Empty);
  705. rpc ServicePlanGet(ServicePlanGetReq) returns (ServicePlanGetResp);
  706. rpc ServicePlanGetWithBoxes(ServicePlanGetWithBoxesReq) returns (ServicePlanGetWithBoxesResp);
  707. rpc ServicePlanList(ServicePlanListReq) returns (ServicePlanListResp);
  708. /** ServicePlanBoxes Model */
  709. // ServicePlanBoxesAdd
  710. rpc ServicePlanBoxesAdd(ServicePlanBoxesAddReq) returns (ServicePlanBoxesAddResp);
  711. rpc ServicePlanBoxesUpdate(ServicePlanBoxesUpdateReq) returns (ServicePlanBoxesUpdateResp);
  712. rpc ServicePlanBoxesDel(ServicePlanBoxesDelReq) returns (Empty);
  713. rpc ServicePlanBoxesGet(ServicePlanBoxesGetReq) returns (ServicePlanBoxesGetResp);
  714. rpc ServicePlanBoxesList(ServicePlanBoxesListReq) returns (ServicePlanBoxesListResp);
  715. /** ServicePlanChannel Model */
  716. // ServicePlanChannelAdd
  717. rpc ServicePlanChannelAdd(ServicePlanChannelAddReq) returns (ServicePlanChannelAddResp);
  718. rpc ServicePlanChannelUpdate(ServicePlanChannelUpdateReq) returns (ServicePlanChannelUpdateResp);
  719. rpc ServicePlanChannelDel(ServicePlanChannelDelReq) returns (Empty);
  720. rpc ServicePlanChannelGet(ServicePlanChannelGetReq) returns (ServicePlanChannelGetResp);
  721. rpc ServicePlanChannelList(ServicePlanChannelListReq) returns (ServicePlanChannelListResp);
  722. }
  723. message I18nVo {
  724. string code = 1;
  725. string value = 2;
  726. }
  727. message ConfigGetReq {
  728. int64 id = 1; // ID
  729. string code = 2; // 类型标识
  730. }
  731. // GlobalParam
  732. message GlobalParamVo {
  733. int64 id = 1;
  734. string paramKey = 2;
  735. string paramValue = 3;
  736. string valueType = 4;
  737. float minValue = 5;
  738. float maxValue = 6;
  739. string name = 7;
  740. BoolInt editable = 8;
  741. BoolInt nullable = 9;
  742. BoolInt hidden = 10;
  743. BoolInt mutiLang = 11;
  744. int64 sort = 12;
  745. string remark = 13;
  746. BoolInt apiExport = 14;
  747. string apiExportName = 15;
  748. int64 createTime = 16;
  749. int64 updateTime = 17;
  750. // valueType 为 string、text、json、string[], 且 mutiLang 为 true 时,需要同时干查询/修改/插入多语言数据
  751. repeated I18nVo i18ns = 18;
  752. }
  753. message GlobalParamGetReq {
  754. GlobalParamVo vo = 1;
  755. string lang = 2;
  756. }
  757. message GlobalParamListReq {
  758. Page page = 1;
  759. GlobalParamVo vo = 2;
  760. repeated int64 excludeIds = 3; // 排除的ID
  761. };
  762. message GlobalParamListResp {
  763. int64 total = 1;
  764. repeated GlobalParamVo list = 2;
  765. };
  766. // end GlobalParam
  767. // Product
  768. message ProductVo {
  769. int64 id = 1;
  770. string code = 2;
  771. string name = 3;
  772. string domain = 4;
  773. Status status = 5;
  774. string langs = 6;
  775. string defaultLang = 7;
  776. string remark = 8;
  777. int64 createTime = 9;
  778. int64 updateTime = 10;
  779. }
  780. message ProductListReq {
  781. Page page = 1;
  782. ProductVo vo = 2;
  783. repeated string productCodes = 3;
  784. repeated int64 excludeIds = 4;
  785. }
  786. message ProductListResp {
  787. int64 total = 1;
  788. repeated ProductVo list = 2;
  789. }
  790. // end Product
  791. // ProductParam
  792. message ProductParamVo {
  793. int64 id = 1;
  794. string productCode = 2;
  795. string paramKey = 3;
  796. string paramValue = 4;
  797. string valueType = 5;
  798. float minValue = 6;
  799. float maxValue = 7;
  800. string name = 8;
  801. BoolInt editable = 9;
  802. BoolInt nullable = 10;
  803. BoolInt hidden = 11;
  804. BoolInt mutiLang = 12;
  805. int64 sort = 13;
  806. string remark = 14;
  807. BoolInt apiExport = 15;
  808. string apiExportName = 16;
  809. int64 createTime = 17;
  810. int64 updateTime = 18;
  811. // valueType 为 string、text、json、string[], 且 mutiLang 为 true
  812. // 时,需要同时干查询/修改/插入多语言数据
  813. repeated I18nVo i18ns = 19;
  814. }
  815. message ProductParamGetReq {
  816. ProductParamVo vo = 1;
  817. string lang = 2;
  818. }
  819. message ProductParamListReq {
  820. Page page = 1;
  821. ProductParamVo vo = 2;
  822. repeated string productCodes = 3;
  823. repeated int64 excludeIds = 4;
  824. };
  825. message ProductParamListResp {
  826. int64 total = 1;
  827. repeated ProductParamVo list = 2;
  828. };
  829. // end ProductParam
  830. // ProductAction
  831. message ProductActionVo {
  832. int64 id = 1;
  833. int64 groupId = 2;
  834. string productCode = 3;
  835. string imgUrl = 4;
  836. string actionType = 5;
  837. string actionData = 6;
  838. string title = 7;
  839. Status status = 8;
  840. int64 createTime = 9;
  841. int64 updateTime = 10;
  842. int64 sort = 11;
  843. string versionPolicy = 12;
  844. string platform = 13;
  845. string channel = 14;
  846. }
  847. message ProductActionReq { ProductActionVo vo = 1; }
  848. message ProductActionListReq {
  849. Page page = 1;
  850. ProductActionVo vo = 2;
  851. repeated string productCodes = 3;
  852. repeated int64 excludeIds = 4;
  853. repeated int64 groupIds = 5;
  854. }
  855. message ProductActionListResp {
  856. int64 total = 1;
  857. repeated ProductActionVo list = 2;
  858. }
  859. // end ProductAction
  860. // ProductActionGroup 产品行为分组
  861. message ProductActionGroupVo {
  862. int64 id = 1;
  863. string productCode = 2;
  864. string area = 3; // 地区,存储json字符串
  865. string platform = 4; // 平台,存储json字符串
  866. string channel = 5; // 渠道,存储json字符串
  867. string versionPolicy = 6; // 版本策略,存储json字符串
  868. int64 sort = 7; // 排序
  869. Status status = 8; // 状态 0未知 1正常 2禁用
  870. string title = 9; // 标题
  871. int64 createTime = 10;
  872. int64 updateTime = 11;
  873. }
  874. message ProductActionGroupReq { ProductActionGroupVo vo = 1; }
  875. message ProductActionGroupListReq {
  876. Page page = 1;
  877. ProductActionGroupVo vo = 2;
  878. repeated string productCodes = 3;
  879. repeated int64 excludeIds = 4;
  880. }
  881. message ProductActionGroupListResp {
  882. int64 total = 1;
  883. repeated ProductActionGroupVo list = 2;
  884. }
  885. message ProductActionGroupDisableReq { repeated int64 ids = 1; }
  886. message ProductActionGroupEnableReq { repeated int64 ids = 1; }
  887. // end ProductActionGroup
  888. // ProductActionPolicyGroup 产品行为策略分组
  889. message ProductActionPolicyGroupVo {
  890. int64 id = 1;
  891. string productCode = 2;
  892. int64 groupId = 3; // productActionGroupID
  893. string platform = 4; // 平台,存储json字符串
  894. string channel = 5; // 渠道,存储json字符串
  895. string versionPolicy = 6; // 版本策略,存储json字符串
  896. int64 sort = 7; // 排序
  897. Status status = 8; // 状态 0未知 1正常 2禁用
  898. string title = 9; // 标题
  899. int64 createTime = 10;
  900. int64 updateTime = 11;
  901. string Position = 12;
  902. }
  903. message ProductActionPolicyGroupReq { ProductActionPolicyGroupVo vo = 1; }
  904. message ProductActionPolicyGroupListReq {
  905. Page page = 1;
  906. ProductActionPolicyGroupVo vo = 2;
  907. repeated string productCodes = 3;
  908. repeated int64 excludeIds = 4;
  909. repeated int64 groupIds = 5;
  910. }
  911. message ProductActionPolicyGroupListResp {
  912. int64 total = 1;
  913. repeated ProductActionPolicyGroupVo list = 2;
  914. }
  915. message ProductActionPolicyGroupDisableReq { repeated int64 ids = 1; }
  916. message ProductActionPolicyGroupEnableReq { repeated int64 ids = 1; }
  917. // end ProductActionPolicyGroup
  918. // ProductActionType 产品行为类型
  919. message ProductActionTypeVo {
  920. int64 id = 1;
  921. string name = 2; // 名称
  922. string description = 3; // 描述
  923. int64 createTime = 4;
  924. int64 updateTime = 5;
  925. }
  926. message ProductActionTypeReq { ProductActionTypeVo vo = 1; }
  927. message ProductActionTypeListReq {
  928. Page page = 1;
  929. ProductActionTypeVo vo = 2;
  930. repeated int64 excludeIds = 3;
  931. }
  932. message ProductActionTypeListResp {
  933. int64 total = 1;
  934. repeated ProductActionTypeVo list = 2;
  935. }
  936. // end ProductActionType
  937. // AreaParam
  938. message AreaParamVo {
  939. int64 id = 1;
  940. string productCode = 2;
  941. string name = 3;
  942. string areas = 4;
  943. string paramValue = 5;
  944. Status status = 6;
  945. int64 sort = 7;
  946. string remark = 8;
  947. int64 createTime = 9;
  948. int64 updateTime = 10;
  949. string version = 11;
  950. }
  951. message AreaParamListReq {
  952. Page page = 1;
  953. AreaParamVo vo = 2;
  954. repeated string productCodes = 3; // 产品code
  955. repeated int64 excludeIds = 4; // 排除的ID
  956. }
  957. message AreaParamListResp {
  958. int64 total = 1;
  959. repeated AreaParamVo list = 2;
  960. }
  961. // end AreaParam
  962. // NationalLanguage
  963. message NationalLanguageVo {
  964. int64 id = 1;
  965. string tbName = 2;
  966. int64 tbRowId = 3;
  967. string tbFieldName = 4;
  968. string lan = 5;
  969. string value = 6;
  970. Status status = 7;
  971. int64 updateTime = 8;
  972. int64 createTime = 9;
  973. }
  974. message NationalLanguageListReq {
  975. Page page = 1;
  976. NationalLanguageVo vo = 2;
  977. repeated int64 excludeIds = 3; // 排除的ID
  978. }
  979. message NationalLanguageListResp {
  980. int64 total = 1;
  981. repeated NationalLanguageVo list = 2;
  982. }
  983. // end NationalLanguage
  984. // Tip
  985. message TipVo {
  986. int64 id = 1;
  987. string productCode = 2;
  988. string paramKey = 3;
  989. string paramValue = 4;
  990. string code = 5;
  991. int64 showType = 6;
  992. int64 sort = 7;
  993. string remark = 8;
  994. int64 createTime = 9;
  995. int64 updateTime = 10;
  996. repeated I18nVo i18ns = 11;
  997. }
  998. message TipGetReq {
  999. TipVo vo = 1;
  1000. string lang = 2;
  1001. }
  1002. message TipListReq {
  1003. Page page = 1;
  1004. TipVo vo = 2;
  1005. repeated string productCodes = 3;
  1006. repeated int64 excludeIds = 4; // 排除的ID
  1007. }
  1008. message TipListResp {
  1009. int64 total = 1;
  1010. repeated TipVo list = 2;
  1011. }
  1012. // end Tip
  1013. // Dict
  1014. message DictVo {
  1015. int64 id = 1;
  1016. string productCode = 2;
  1017. int64 parentId = 3;
  1018. string dataType = 4;
  1019. string name = 5;
  1020. string payload = 6;
  1021. int64 sort = 7;
  1022. Status status = 8;
  1023. string remark = 9;
  1024. int64 createTime = 10;
  1025. int64 updateTime = 11;
  1026. string payloadJson = 12;
  1027. }
  1028. message DictGetReq { DictVo vo = 1; }
  1029. message DictListReq {
  1030. Page page = 1;
  1031. DictVo vo = 2;
  1032. repeated string productCodes = 3;
  1033. repeated int64 excludeIds = 4;
  1034. }
  1035. message DictListResp {
  1036. int64 total = 1;
  1037. repeated DictVo list = 2;
  1038. }
  1039. // end Dict
  1040. // message UpgradeResVo {
  1041. // int64 id = 1;
  1042. // string title = 2;
  1043. // string path = 3;
  1044. // string fileMd5 = 4;
  1045. // string filePath = 5;
  1046. // string metadataId = 6;
  1047. // string createdAt = 7;
  1048. // string runtimeVersion = 8;
  1049. // int64 runtimeVersionCode = 9;
  1050. // string appVersionName = 10;
  1051. // int64 appVersionCode = 11;
  1052. // Status status = 12;
  1053. // string remark = 13;
  1054. // int64 createTime = 14;
  1055. // int64 updateTime = 15;
  1056. // int64 resSize = 16;
  1057. // }
  1058. // message UpgradeResConfigVo {
  1059. // int64 id = 1;
  1060. // int64 productId = 2;
  1061. // string platform = 3;
  1062. // string channel = 4;
  1063. // int64 resId = 5;
  1064. // int64 isForceUpdate = 6;
  1065. // string forceIntro = 7;
  1066. // string areaConfigs = 8;
  1067. // string versionConfigs = 9;
  1068. // int64 interval = 10;
  1069. // int64 upgradeRate = 11;
  1070. // string intro = 12;
  1071. // string apis = 13;
  1072. // Status status = 14;
  1073. // string remark = 15;
  1074. // string userIds = 16;
  1075. // int64 createTime = 17;
  1076. // int64 updateTime = 18;
  1077. // string forceVersionConfigs = 19;
  1078. // string forceAreaConfigs = 20;
  1079. // string runtimeVersionConfigs = 21;
  1080. // string title = 22;
  1081. // int64 isSilent = 23;
  1082. // }
  1083. // message UpgradePkgVo {
  1084. // int64 id = 1;
  1085. // int64 productId = 2;
  1086. // string platform = 3;
  1087. // string channel = 4;
  1088. // int64 versionCode = 5;
  1089. // string versionName = 6;
  1090. // string fileMd5 = 7;
  1091. // string areaConfigs = 8;
  1092. // string versionConfigs = 9;
  1093. // int64 interval = 10;
  1094. // int64 upgradeRate = 11;
  1095. // string intro = 12;
  1096. // string appStoreUrl = 13;
  1097. // string url = 14;
  1098. // string onlineUrls = 15;
  1099. // string userIds = 16;
  1100. // int64 isForceUpdate = 17;
  1101. // string forceIntro = 18;
  1102. // string forceVersionConfigs = 19;
  1103. // Status status = 20;
  1104. // string remark = 21;
  1105. // int64 createTime = 22;
  1106. // int64 updateTime = 23;
  1107. // string title = 24;
  1108. // string forceAreaConfigs = 25;
  1109. // }
  1110. // message UpgradeResConfigGetReq {
  1111. // Page page = 1;
  1112. // int64 id = 2;
  1113. // }
  1114. // message UpgradeResConfigListReq {
  1115. // Page page = 1;
  1116. // UpgradeResConfigVo vo = 2;
  1117. // }
  1118. // message UpgradeResConfigListResp {
  1119. // int64 total = 1;
  1120. // repeated UpgradeResConfigVo list = 2;
  1121. // }
  1122. // message UpgradePkgGetReq { UpgradePkgVo vo = 1; }
  1123. // message UpgradePkgListReq {
  1124. // Page page = 1;
  1125. // UpgradePkgVo vo = 2;
  1126. // }
  1127. // message UpgradePkgListResp {
  1128. // int64 total = 1;
  1129. // repeated UpgradePkgVo list = 2;
  1130. // }
  1131. // message UpgradeResGetReq { UpgradeResVo vo = 1; }
  1132. // message UpgradeResListReq {
  1133. // Page page = 1;
  1134. // UpgradeResVo vo = 2;
  1135. // }
  1136. // message UpgradeResListResp {
  1137. // int64 total = 1;
  1138. // repeated UpgradeResVo list = 2;
  1139. // }
  1140. // message ResourceDelReq {
  1141. // repeated int64 ids = 1;
  1142. // string fileMd5 = 2;
  1143. // }
  1144. // UpgradePkgPlan
  1145. message UpgradePkgPlanVo {
  1146. int64 id = 1;
  1147. string productCode = 2; // 产品code
  1148. string areas = 3; // 地区列表
  1149. int64 sort = 4;
  1150. Status status = 5; // 状态
  1151. string remark = 6;
  1152. int64 createTime = 7;
  1153. int64 updateTime = 8;
  1154. }
  1155. message UpgradePkgPlanListReq {
  1156. Page page = 1;
  1157. UpgradePkgPlanVo vo = 2;
  1158. repeated string productCodes = 3;
  1159. repeated int64 excludeIds = 4;
  1160. }
  1161. message UpgradePkgPlanListResp {
  1162. int64 total = 1;
  1163. repeated UpgradePkgPlanVo list = 2;
  1164. }
  1165. // end UpgradePkgPlan
  1166. // UpgradePkgPlanDetail
  1167. message UpgradePkgPlanDetailVo {
  1168. int64 id = 1;
  1169. int64 planId = 2; // 方案ID
  1170. string platform = 3; // 平台
  1171. string channel = 4; // 渠道
  1172. string name = 5; // 名称
  1173. int64 ver = 6; // 版本号
  1174. string url = 7; // 商店地址
  1175. string websiteUrl = 8; // 官网地址
  1176. string directUrl = 9; // 直接下载地址
  1177. string md5 = 10; // MD5
  1178. string info = 11; // 更新信息
  1179. string testUpgradePolicyConfig = 12; // 测试更新策略配置
  1180. string upgradePolicyConfig = 13; // 更新策略配置
  1181. string forceUpgradePolicyConfig = 14; // 强制更新策略
  1182. Status status = 15; // 状态
  1183. string remark = 16;
  1184. int64 createTime = 17;
  1185. int64 updateTime = 18;
  1186. }
  1187. message UpgradePkgPlanDetailListReq {
  1188. Page page = 1;
  1189. UpgradePkgPlanDetailVo vo = 2;
  1190. repeated int64 planIds = 3;
  1191. }
  1192. message UpgradePkgPlanDetailListResp {
  1193. int64 total = 1;
  1194. repeated UpgradePkgPlanDetailVo list = 2;
  1195. }
  1196. // end UpgradePkgPlanDetail
  1197. // UpgradeResPlan
  1198. message UpgradeResPlanVo {
  1199. int64 id = 1;
  1200. string productCode = 2; // 产品code
  1201. string areas = 3; // 地区列表
  1202. int64 sort = 4;
  1203. Status status = 5; // 状态
  1204. string remark = 6;
  1205. int64 createTime = 7;
  1206. int64 updateTime = 8;
  1207. }
  1208. message UpgradeResPlanListReq {
  1209. Page page = 1;
  1210. UpgradeResPlanVo vo = 2;
  1211. repeated string productCodes = 3;
  1212. repeated int64 excludeIds = 4;
  1213. }
  1214. message UpgradeResPlanListResp {
  1215. int64 total = 1;
  1216. repeated UpgradeResPlanVo list = 2;
  1217. }
  1218. // end UpgradeResPlan
  1219. // UpgradeResPlanDetail
  1220. message UpgradeResPlanDetailVo {
  1221. int64 id = 1; // ID
  1222. int64 planId = 2; // 方案ID
  1223. string platform = 3; // 平台
  1224. string channel = 4; // 渠道
  1225. string name = 5; // 名称
  1226. int64 ver = 6; // 资源版本号
  1227. string url = 7; // 资源地址
  1228. string info = 8; // 更新信息
  1229. string md5 = 9; // 资源 md5值
  1230. int64 size = 10; // 资源大小
  1231. string testUpgradePolicyConfig = 11; // 测试更新策略配置
  1232. string upgradePolicyConfig = 12; // 更新策略配置
  1233. string forceUpgradePolicyConfig = 13; // 强制更新策略
  1234. Status status = 14; // 状态,1=正常,2=冻结
  1235. string remark = 15; // 备注
  1236. int64 createTime = 16; // 创建时间秒
  1237. int64 updateTime = 17; // 修改时间秒
  1238. }
  1239. message UpgradeResPlanDetailListReq {
  1240. Page page = 1;
  1241. UpgradeResPlanDetailVo vo = 2;
  1242. repeated int64 planIds = 3;
  1243. }
  1244. message UpgradeResPlanDetailListResp {
  1245. int64 total = 1;
  1246. repeated UpgradeResPlanDetailVo list = 2;
  1247. }
  1248. // end UpgradeResPlanDetail
  1249. // AdPlan
  1250. message AdPlanVo {
  1251. int64 id = 1;
  1252. string productCode = 2; // 产品code
  1253. string areas = 3; // 地区列表
  1254. string config = 4; // 配置
  1255. int64 sort = 5;
  1256. Status status = 6; // 状态
  1257. string remark = 7;
  1258. int64 createTime = 8;
  1259. int64 updateTime = 9;
  1260. }
  1261. message AdPlanListReq {
  1262. Page page = 1;
  1263. AdPlanVo vo = 2;
  1264. repeated string productCodes = 3;
  1265. repeated int64 excludeIds = 4;
  1266. }
  1267. message AdPlanListResp {
  1268. int64 total = 1;
  1269. repeated AdPlanVo list = 2;
  1270. }
  1271. // end AdPlan
  1272. // AdPlanDetail
  1273. message AdPlanDetailVo {
  1274. int64 id = 1;
  1275. int64 planId = 2; // 方案ID
  1276. string adPlatform = 3; // 平台
  1277. string adType = 4; // 广告类型
  1278. string adSlot = 5; // 广告位置
  1279. string adDatas = 6; // 广告资源
  1280. string testPolicyConfig = 7; // 策略配置
  1281. string policyConfig = 8; // 策略配置
  1282. int64 sort = 9; // 排序
  1283. Status status = 10; // 0未知,1正常,2暂停
  1284. string remark = 11;
  1285. int64 createTime = 12;
  1286. int64 updateTime = 13;
  1287. string version = 14;
  1288. }
  1289. message AdPlanDetailListReq {
  1290. Page page = 1;
  1291. AdPlanDetailVo vo = 2;
  1292. repeated int64 planIds = 3;
  1293. }
  1294. message AdPlanDetailListResp {
  1295. int64 total = 1;
  1296. repeated AdPlanDetailVo list = 2;
  1297. }
  1298. // end AdPlanDetail
  1299. // AdGlobalConfig
  1300. message AdGlobalConfigVo {
  1301. int64 id = 1;
  1302. string productCode = 2; // 产品code
  1303. string platforms = 3; // 按平台分类的广告配置JSON
  1304. string remark = 4; // 备注
  1305. int64 createTime = 5; // 创建时间
  1306. int64 updateTime = 6; // 更新时间
  1307. }
  1308. message AdGlobalConfigGetReq {
  1309. string productCode = 1; // 产品代码
  1310. }
  1311. // end AdGlobalConfig
  1312. // JobBatch
  1313. message JobBatchVo {
  1314. int64 id = 1; // ID
  1315. string name = 2; // 作业名称
  1316. string type = 3; // 作业类型
  1317. string initParams = 4; // 作业初始化参数
  1318. string contextData = 5; // 上下文数据,可用于存储此次批量作业的任务过程中产生的通用的中间数据
  1319. string beginHandler = 6; // 预处理函数/URL
  1320. string afterHandler = 7; // 后处理函数/URL
  1321. int64 concurrency = 8; // 并发控制数
  1322. string retryPolicy = 9; // 子任务重试策略
  1323. int64 startedTime = 10; // 批量作业开始时间
  1324. int64 finishedTime = 11; // 批量作业完成时间
  1325. string result = 12; // 批量作业返回结果
  1326. string status = 13; // 批量作业完成状态
  1327. string remark = 14; // 备注
  1328. int64 createAt = 15; // 创建者ID
  1329. int64 updateAt = 16; // 更新者ID
  1330. int64 createTime = 17; // 创建时间
  1331. int64 updateTime = 18; // 更新时间
  1332. }
  1333. message JobBatchWithTasksVo {
  1334. JobBatchVo jobBatch = 1;
  1335. repeated JobTasksVo jobTasks = 2;
  1336. }
  1337. message TimeRange {
  1338. int64 start = 1;
  1339. int64 end = 2;
  1340. }
  1341. message JobBatchListReq {
  1342. Page page = 1;
  1343. JobBatchVo vo = 2;
  1344. TimeRange startedTimeRange = 3;
  1345. TimeRange finishedTimeRange = 4;
  1346. repeated string statuses = 5;
  1347. repeated int64 excludeIds = 6;
  1348. }
  1349. message JobBatchListResp {
  1350. int64 total = 1;
  1351. repeated JobBatchVo list = 2;
  1352. }
  1353. message JobBatchListWithTasksResp {
  1354. int64 total = 1;
  1355. repeated JobBatchWithTasksVo list = 2;
  1356. }
  1357. // end JobBatch
  1358. // JobTasks
  1359. message JobTasksVo {
  1360. int64 id = 1; // 任务id
  1361. int64 batchId = 2; // 批量作业Id
  1362. string name = 3; // 任务名称
  1363. string initParams = 4; // 任务初始化配置及数据
  1364. string runtimeData = 5; // 任务运行时数据,用于临时存储任务过程中各个关键节点的中间数据
  1365. string externalRefs = 6; // 外部系统引用,用于记录与外部系统交互产生的关联标识
  1366. int64 startedTime = 7; // 任务开始时间
  1367. int64 finishedTime = 8; // 任务结束时间
  1368. int64 retryCount = 9; // 当前已重试次数
  1369. string result = 10; // 任务执行结果
  1370. string status = 11; // 任务状态
  1371. string remark = 12; // 备注
  1372. int64 createAt = 13; // 创建者ID
  1373. int64 updateAt = 14; // 更新者ID
  1374. int64 createTime = 15; // 创建时间
  1375. int64 updateTime = 16; // 更新时间
  1376. }
  1377. message JobTasksListReq {
  1378. Page page = 1;
  1379. JobTasksVo vo = 2;
  1380. TimeRange startedTimeRange = 3;
  1381. TimeRange finishedTimeRange = 4;
  1382. repeated string statuses = 5;
  1383. repeated int64 excludeIds = 6;
  1384. }
  1385. message JobTasksListResp {
  1386. int64 total = 1;
  1387. repeated JobTasksVo list = 2;
  1388. }
  1389. // end JobTasks
  1390. // DeployConfig
  1391. message DeployConfigVo {
  1392. int64 id = 1; // ID
  1393. string name = 2; // 名称
  1394. string type = 3; // 类型
  1395. string data = 4; // 数据
  1396. Status status = 5; // 状态
  1397. string remark = 6; // 备注
  1398. int64 createTime = 7; // 创建时间
  1399. int64 updateTime = 8; // 更新时间
  1400. }
  1401. message DeployConfigListReq {
  1402. Page page = 1;
  1403. DeployConfigVo vo = 2;
  1404. repeated int64 excludeIds = 3;
  1405. }
  1406. message DeployConfigListResp {
  1407. int64 total = 1;
  1408. repeated DeployConfigVo list = 2;
  1409. }
  1410. // end DeployConfig
  1411. // OperationLog
  1412. message OperationLogVo {
  1413. int64 id = 1;
  1414. int64 sysUserId = 2;
  1415. string productCode = 3;
  1416. string model = 4;
  1417. string action = 5;
  1418. string details = 6;
  1419. string result = 7;
  1420. int64 updateTime = 8;
  1421. int64 createTime = 9;
  1422. }
  1423. message OperationLogListReq {
  1424. Page page = 1;
  1425. OperationLogVo vo = 2;
  1426. repeated string productCodes = 3;
  1427. repeated int64 excludeIds = 4;
  1428. }
  1429. message OperationLogListResp {
  1430. int64 total = 1;
  1431. repeated OperationLogVo list = 2;
  1432. }
  1433. // end OperationLog
  1434. // AnnouncePlan
  1435. message AnnouncePlanVo {
  1436. int64 id = 1;
  1437. string productCode = 2; // 产品code
  1438. string areas = 3; // 地区列表
  1439. int64 sort = 4;
  1440. Status status = 5; // 状态
  1441. string remark = 6;
  1442. int64 createTime = 7;
  1443. int64 updateTime = 8;
  1444. }
  1445. message AnnouncePlanListReq {
  1446. Page page = 1;
  1447. AnnouncePlanVo vo = 2;
  1448. repeated string productCodes = 3;
  1449. repeated int64 excludeIds = 4;
  1450. }
  1451. message AnnouncePlanListResp {
  1452. int64 total = 1;
  1453. repeated AnnouncePlanVo list = 2;
  1454. }
  1455. // end AnnouncePlan
  1456. // AnnouncePlanDetail
  1457. message AnnouncePlanDetailVo {
  1458. int64 id = 1;
  1459. int64 planId = 2; // 方案ID
  1460. string platforms = 3; // 平台
  1461. string channels = 4; // 渠道
  1462. string icon = 5; // 图标
  1463. string title = 6; // 标题
  1464. string content = 7; // 内容
  1465. string url = 8; // 商店地址
  1466. string buttonText = 9; // 按钮文本
  1467. int64 closeable = 10; // 是否可关闭
  1468. int64 sort = 11; // 排序
  1469. string policyConfig = 12; // 更新策略配置
  1470. Status status = 13; // 状态
  1471. string remark = 14;
  1472. int64 createTime = 15;
  1473. int64 updateTime = 16;
  1474. }
  1475. message AnnouncePlanDetailListReq {
  1476. Page page = 1;
  1477. AnnouncePlanDetailVo vo = 2;
  1478. repeated int64 planIds = 3;
  1479. }
  1480. message AnnouncePlanDetailListResp {
  1481. int64 total = 1;
  1482. repeated AnnouncePlanDetailVo list = 2;
  1483. }
  1484. // end AnnouncePlanDetail
  1485. message MessagePushVo {
  1486. int64 id = 1;
  1487. string status = 2;
  1488. int64 operator = 3;
  1489. string module = 4;
  1490. string title = 5;
  1491. string message = 6;
  1492. string imgUrl = 7;
  1493. string data = 8;
  1494. string productCode = 9;
  1495. int64 areaParam = 10;
  1496. repeated string topics = 11;
  1497. repeated string firebaseTokens = 12;
  1498. int64 publishTime = 13;
  1499. int64 createTime = 14;
  1500. int64 updateTime = 15;
  1501. string pushType = 16;
  1502. int64 publishCount = 17;
  1503. string exData = 18;
  1504. }
  1505. message MessagePushListReq {
  1506. Page page = 1;
  1507. MessagePushVo vo = 2;
  1508. }
  1509. message MessagePushListResp {
  1510. int64 total = 1;
  1511. repeated MessagePushVo list = 2;
  1512. }
  1513. // 基础服务: 产品管理,产品配置,升级配置、更新资源管理,资源版本管理,全局配置
  1514. service GoPmpClient {
  1515. rpc Ping(Request) returns (Response);
  1516. // GlobalParamVo Model
  1517. // GlobalParamAdd
  1518. rpc GlobalParamAdd(GlobalParamVo) returns (GlobalParamVo);
  1519. rpc GlobalParamUpdate(GlobalParamVo) returns (GlobalParamVo);
  1520. rpc GlobalParamDel(Ids) returns (Empty);
  1521. rpc GlobalParamGet(GlobalParamVo) returns (GlobalParamVo); // 兼容旧接口,新版本代码中请不要调用
  1522. rpc GlobalParamGetWithLang(GlobalParamGetReq) returns (GlobalParamVo);
  1523. rpc GlobalParamList(GlobalParamListReq) returns (GlobalParamListResp);
  1524. // ProductVo Model
  1525. // ProductAdd
  1526. rpc ProductAdd(ProductVo) returns (ProductVo);
  1527. rpc ProductUpdate(ProductVo) returns (ProductVo);
  1528. rpc ProductDel(Ids) returns (Empty);
  1529. rpc ProductGet(ProductVo) returns (ProductVo);
  1530. rpc ProductList(ProductListReq) returns (ProductListResp);
  1531. rpc ProductAll(Request) returns (ProductListResp);
  1532. // ProductParamVo Model
  1533. // ProductParamAdd
  1534. rpc ProductParamAdd(ProductParamVo) returns (ProductParamVo);
  1535. rpc ProductParamUpdate(ProductParamVo) returns (ProductParamVo);
  1536. rpc ProductParamDel(Ids) returns (Empty);
  1537. rpc ProductParamGet(ProductParamVo) returns (ProductParamVo); // 兼容旧接口,新版本代码中请不要调用
  1538. rpc ProductParamGetWithLang(ProductParamGetReq) returns (ProductParamVo);
  1539. rpc ProductParamList(ProductParamListReq) returns (ProductParamListResp);
  1540. // ProductAction 产品行为配置
  1541. rpc ProductActionAdd(ProductActionVo) returns (ProductActionVo);
  1542. rpc ProductActionUpdate(ProductActionVo) returns (ProductActionVo);
  1543. rpc ProductActionDel(Ids) returns (Empty);
  1544. rpc ProductActionGet(ProductActionReq) returns (ProductActionVo);
  1545. rpc ProductActionList(ProductActionListReq) returns (ProductActionListResp);
  1546. // ProductActionGroup 产品行为分组
  1547. rpc ProductActionGroupAdd(ProductActionGroupVo) returns (ProductActionGroupVo);
  1548. rpc ProductActionGroupUpdate(ProductActionGroupVo) returns (ProductActionGroupVo);
  1549. rpc ProductActionGroupDel(Ids) returns (Empty);
  1550. rpc ProductActionGroupGet(ProductActionGroupReq) returns (ProductActionGroupVo);
  1551. rpc ProductActionGroupList(ProductActionGroupListReq) returns (ProductActionGroupListResp);
  1552. rpc ProductActionGroupDisable(ProductActionGroupDisableReq) returns (Empty);
  1553. rpc ProductActionGroupEnable(ProductActionGroupEnableReq) returns (Empty);
  1554. // ProductActionPolicyGroup 产品行为策略分组
  1555. rpc ProductActionPolicyGroupAdd(ProductActionPolicyGroupVo) returns (ProductActionPolicyGroupVo);
  1556. rpc ProductActionPolicyGroupUpdate(ProductActionPolicyGroupVo) returns (ProductActionPolicyGroupVo);
  1557. rpc ProductActionPolicyGroupDel(Ids) returns (Empty);
  1558. rpc ProductActionPolicyGroupGet(ProductActionPolicyGroupReq) returns (ProductActionPolicyGroupVo);
  1559. rpc ProductActionPolicyGroupList(ProductActionPolicyGroupListReq) returns (ProductActionPolicyGroupListResp);
  1560. rpc ProductActionPolicyGroupDisable(ProductActionPolicyGroupDisableReq) returns (Empty);
  1561. rpc ProductActionPolicyGroupEnable(ProductActionPolicyGroupEnableReq) returns (Empty);
  1562. // ProductActionType 产品行为类型
  1563. rpc ProductActionTypeAdd(ProductActionTypeVo) returns (ProductActionTypeVo);
  1564. rpc ProductActionTypeUpdate(ProductActionTypeVo) returns (ProductActionTypeVo);
  1565. rpc ProductActionTypeDel(Ids) returns (Empty);
  1566. rpc ProductActionTypeGet(ProductActionTypeReq) returns (ProductActionTypeVo);
  1567. rpc ProductActionTypeList(ProductActionTypeListReq) returns (ProductActionTypeListResp);
  1568. // AreaParamVo Model
  1569. // AreaParamAdd
  1570. rpc AreaParamAdd(AreaParamVo) returns (AreaParamVo);
  1571. rpc AreaParamUpdate(AreaParamVo) returns (AreaParamVo);
  1572. rpc AreaParamDel(Ids) returns (Empty);
  1573. rpc AreaParamGet(AreaParamVo) returns (AreaParamVo);
  1574. rpc AreaParamList(AreaParamListReq) returns (AreaParamListResp);
  1575. // NationalLanguage Model
  1576. // NationalLanguageAdd
  1577. rpc NationalLanguageAdd(NationalLanguageVo) returns (NationalLanguageVo);
  1578. rpc NationalLanguageUpdate(NationalLanguageVo) returns (NationalLanguageVo);
  1579. rpc NationalLanguageDel(Ids) returns (Empty);
  1580. rpc NationalLanguageGet(NationalLanguageVo) returns (NationalLanguageVo);
  1581. rpc NationalLanguageList(NationalLanguageListReq) returns (NationalLanguageListResp);
  1582. // Tip Model
  1583. // TipAdd
  1584. rpc TipAdd(TipVo) returns (TipVo);
  1585. rpc TipUpdate(TipVo) returns (TipVo);
  1586. rpc TipDel(Ids) returns (Empty);
  1587. rpc TipGet(TipGetReq) returns (TipVo);
  1588. rpc TipList(TipListReq) returns (TipListResp);
  1589. // Dict Model
  1590. // DictAdd
  1591. rpc DictAdd(DictVo) returns (DictVo);
  1592. rpc DictUpdate(DictVo) returns (DictVo);
  1593. rpc DictDel(Ids) returns (Empty);
  1594. rpc DictGet(DictGetReq) returns (DictVo);
  1595. rpc DictList(DictListReq) returns (DictListResp);
  1596. // // UpgradeRes 热更新代码资源管理
  1597. // rpc UpgradeResAdd(UpgradeResVo) returns (UpgradeResVo);
  1598. // rpc UpgradeResUpdate(UpgradeResVo) returns (Empty);
  1599. // rpc UpgradeResDel(ResourceDelReq) returns (Empty);
  1600. // rpc UpgradeResGet(UpgradeResGetReq) returns (UpgradeResVo);
  1601. // rpc UpgradeResList(UpgradeResListReq) returns (UpgradeResListResp);
  1602. // // UpgradePkg app 包更新管理
  1603. // rpc UpgradePkgAdd(UpgradePkgVo) returns (UpgradePkgVo);
  1604. // rpc UpgradePkgUpdate(UpgradePkgVo) returns (Empty);
  1605. // rpc UpgradePkgDel(Ids) returns (Empty);
  1606. // rpc UpgradePkgGet(UpgradePkgGetReq) returns (UpgradePkgVo);
  1607. // rpc UpgradePkgList(UpgradePkgListReq) returns (UpgradePkgListResp);
  1608. // // UpgradeResConfig Model
  1609. // // UpgradeResConfigAdd
  1610. // 热更新【代码资源】配置管理,控制哪些版本地区的用户可以更新
  1611. // rpc UpgradeResConfigAdd(UpgradeResConfigVo) returns (UpgradeResConfigVo);
  1612. // rpc UpgradeResConfigUpdate(UpgradeResConfigVo) returns (Empty);
  1613. // rpc UpgradeResConfigDel(Ids) returns (Empty);
  1614. // rpc UpgradeResConfigGet(UpgradeResConfigGetReq) returns (UpgradeResConfigVo);
  1615. // rpc UpgradeResConfigList(UpgradeResConfigListReq) returns (UpgradeResConfigListResp);
  1616. // UpgradePkgPlan Model
  1617. // UpgradePkgPlanAdd
  1618. rpc UpgradePkgPlanAdd(UpgradePkgPlanVo) returns (UpgradePkgPlanVo);
  1619. rpc UpgradePkgPlanUpdate(UpgradePkgPlanVo) returns (UpgradePkgPlanVo);
  1620. rpc UpgradePkgPlanDel(Ids) returns (Empty);
  1621. rpc UpgradePkgPlanGet(UpgradePkgPlanVo) returns (UpgradePkgPlanVo);
  1622. rpc UpgradePkgPlanList(UpgradePkgPlanListReq) returns (UpgradePkgPlanListResp);
  1623. // UpgradePkgPlanDetail Model
  1624. // UpgradePkgPlanDetailAdd
  1625. rpc UpgradePkgPlanDetailAdd(UpgradePkgPlanDetailVo) returns (UpgradePkgPlanDetailVo);
  1626. rpc UpgradePkgPlanDetailUpdate(UpgradePkgPlanDetailVo) returns (UpgradePkgPlanDetailVo);
  1627. rpc UpgradePkgPlanDetailDel(Ids) returns (Empty);
  1628. rpc UpgradePkgPlanDetailGet(UpgradePkgPlanDetailVo) returns (UpgradePkgPlanDetailVo);
  1629. rpc UpgradePkgPlanDetailList(UpgradePkgPlanDetailListReq) returns (UpgradePkgPlanDetailListResp);
  1630. // UpgradeResPlan Model
  1631. // UpgradeResPlanAdd
  1632. rpc UpgradeResPlanAdd(UpgradeResPlanVo) returns (UpgradeResPlanVo);
  1633. rpc UpgradeResPlanUpdate(UpgradeResPlanVo) returns (UpgradeResPlanVo);
  1634. rpc UpgradeResPlanDel(Ids) returns (Empty);
  1635. rpc UpgradeResPlanGet(UpgradeResPlanVo) returns (UpgradeResPlanVo);
  1636. rpc UpgradeResPlanList(UpgradeResPlanListReq) returns (UpgradeResPlanListResp);
  1637. // UpgradeResPlanDetail Model
  1638. // UpgradeResPlanDetailAdd
  1639. rpc UpgradeResPlanDetailAdd(UpgradeResPlanDetailVo) returns (UpgradeResPlanDetailVo);
  1640. rpc UpgradeResPlanDetailUpdate(UpgradeResPlanDetailVo) returns (UpgradeResPlanDetailVo);
  1641. rpc UpgradeResPlanDetailDel(Ids) returns (Empty);
  1642. rpc UpgradeResPlanDetailGet(UpgradeResPlanDetailVo) returns (UpgradeResPlanDetailVo);
  1643. rpc UpgradeResPlanDetailList(UpgradeResPlanDetailListReq) returns (UpgradeResPlanDetailListResp);
  1644. // AdPlan Model
  1645. // AdPlanAdd
  1646. rpc AdPlanAdd(AdPlanVo) returns (AdPlanVo);
  1647. rpc AdPlanUpdate(AdPlanVo) returns (AdPlanVo);
  1648. rpc AdPlanDel(Ids) returns (Empty);
  1649. rpc AdPlanGet(AdPlanVo) returns (AdPlanVo);
  1650. rpc AdPlanList(AdPlanListReq) returns (AdPlanListResp);
  1651. // AdPlanDetail Model
  1652. // AdPlanDetailAdd
  1653. rpc AdPlanDetailAdd(AdPlanDetailVo) returns (AdPlanDetailVo);
  1654. rpc AdPlanDetailUpdate(AdPlanDetailVo) returns (AdPlanDetailVo);
  1655. rpc AdPlanDetailDel(Ids) returns (Empty);
  1656. rpc AdPlanDetailGet(AdPlanDetailVo) returns (AdPlanDetailVo);
  1657. rpc AdPlanDetailList(AdPlanDetailListReq) returns (AdPlanDetailListResp);
  1658. // AdGlobalConfig Model
  1659. // AdGlobalConfigGet
  1660. rpc AdGlobalConfigGet(AdGlobalConfigGetReq) returns (AdGlobalConfigVo);
  1661. rpc AdGlobalConfigUpdate(AdGlobalConfigVo) returns (AdGlobalConfigVo);
  1662. // JobBatch Model
  1663. // JobBatchAdd
  1664. rpc JobBatchAdd(JobBatchVo) returns (JobBatchVo);
  1665. rpc JobBatchAddWithTasks(JobBatchWithTasksVo) returns (JobBatchWithTasksVo);
  1666. rpc JobBatchUpdate(JobBatchVo) returns (JobBatchVo);
  1667. rpc JobBatchDel(Ids) returns (Empty);
  1668. rpc JobBatchGet(JobBatchVo) returns (JobBatchVo);
  1669. rpc JobBatchGetWithTasks(JobBatchVo) returns (JobBatchWithTasksVo);
  1670. rpc JobBatchList(JobBatchListReq) returns (JobBatchListResp);
  1671. rpc JobBatchListWithTasks(JobBatchListReq) returns (JobBatchListWithTasksResp);
  1672. // JobTasks Model
  1673. // JobTasksAdd
  1674. rpc JobTasksAdd(JobTasksVo) returns (JobTasksVo);
  1675. rpc JobTasksUpdate(JobTasksVo) returns (JobTasksVo);
  1676. rpc JobTasksDel(Ids) returns (Empty);
  1677. rpc JobTasksGet(JobTasksVo) returns (JobTasksVo);
  1678. rpc JobTasksList(JobTasksListReq) returns (JobTasksListResp);
  1679. // DeployConfig Model
  1680. // DeployConfigAdd
  1681. rpc DeployConfigAdd(DeployConfigVo) returns (DeployConfigVo);
  1682. rpc DeployConfigUpdate(DeployConfigVo) returns (DeployConfigVo);
  1683. rpc DeployConfigDel(Ids) returns (Empty);
  1684. rpc DeployConfigGet(DeployConfigVo) returns (DeployConfigVo);
  1685. rpc DeployConfigList(DeployConfigListReq) returns (DeployConfigListResp);
  1686. // OperationLog Model
  1687. // OperationLogAdd
  1688. rpc OperationLogAdd(OperationLogVo) returns (OperationLogVo);
  1689. rpc OperationLogUpdate(OperationLogVo) returns (OperationLogVo);
  1690. rpc OperationLogGet(OperationLogVo) returns (OperationLogVo);
  1691. rpc OperationLogList(OperationLogListReq) returns (OperationLogListResp);
  1692. // AnnouncePlan Model
  1693. // AnnouncePlanAdd
  1694. rpc AnnouncePlanAdd(AnnouncePlanVo) returns (AnnouncePlanVo);
  1695. rpc AnnouncePlanUpdate(AnnouncePlanVo) returns (AnnouncePlanVo);
  1696. rpc AnnouncePlanDel(Ids) returns (Empty);
  1697. rpc AnnouncePlanGet(AnnouncePlanVo) returns (AnnouncePlanVo);
  1698. rpc AnnouncePlanList(AnnouncePlanListReq) returns (AnnouncePlanListResp);
  1699. // AnnouncePlanDetail Model
  1700. // AnnouncePlanDetailAdd
  1701. rpc AnnouncePlanDetailAdd(AnnouncePlanDetailVo) returns (AnnouncePlanDetailVo);
  1702. rpc AnnouncePlanDetailUpdate(AnnouncePlanDetailVo) returns (AnnouncePlanDetailVo);
  1703. rpc AnnouncePlanDetailDel(Ids) returns (Empty);
  1704. rpc AnnouncePlanDetailGet(AnnouncePlanDetailVo) returns (AnnouncePlanDetailVo);
  1705. rpc AnnouncePlanDetailList(AnnouncePlanDetailListReq) returns (AnnouncePlanDetailListResp);
  1706. // MessagePush Model
  1707. // MessagePushAdd
  1708. rpc MessagePushAdd(MessagePushVo) returns (MessagePushVo);
  1709. rpc MessagePushUpdate(MessagePushVo) returns (MessagePushVo);
  1710. rpc MessagePushList(MessagePushListReq) returns (MessagePushListResp);
  1711. }
  1712. message ShortDramaEpisodeVo {
  1713. int64 id = 1;
  1714. int64 dramaId = 2;
  1715. int64 type = 3;
  1716. string name = 4;
  1717. int64 sort = 5;
  1718. string videos = 6;
  1719. string subtitles = 7;
  1720. Status status = 8;
  1721. int64 createTime = 9;
  1722. int64 updateTime = 10;
  1723. string danmakuUrl = 11;
  1724. }
  1725. message ShortDramaEpisodeGetReq { ShortDramaEpisodeVo vo = 1; }
  1726. message ShortDramaEpisodeListReq {
  1727. Page page = 1;
  1728. ShortDramaEpisodeVo vo = 2;
  1729. repeated int64 dramaIds = 3;
  1730. }
  1731. message ShortDramaEpisodeListResp {
  1732. int64 total = 1;
  1733. repeated ShortDramaEpisodeVo list = 2;
  1734. }
  1735. message ShortDramaEpisodeBatchAddReq {
  1736. int64 dramaId = 1;
  1737. repeated ShortDramaEpisodeVo episodes = 2;
  1738. }
  1739. message ShortDramaEpisodeBatchRefreshUpdateTimeReq { int64 dramaId = 1; }
  1740. message ShortDramaLanguageVo {
  1741. int64 id = 1;
  1742. int64 dramaId = 2;
  1743. string lang = 3;
  1744. string title = 4;
  1745. string description = 5;
  1746. string covers = 6;
  1747. string coverDominantColor = 7;
  1748. int64 createTime = 8;
  1749. int64 updateTime = 9;
  1750. }
  1751. message ShortDramaVo {
  1752. int64 id = 1;
  1753. string productCodes = 2;
  1754. string title = 3;
  1755. string description = 4;
  1756. string covers = 5;
  1757. string coverDominantColor = 6;
  1758. string type = 7;
  1759. string tags = 8;
  1760. string releaseRegions = 9;
  1761. int64 releaseDate = 10;
  1762. int64 totalEpisodes = 11;
  1763. int64 completedStatus = 12;
  1764. string copyrightSupplier = 13;
  1765. string copyrightDoc = 14;
  1766. int64 copyrightPurchaseDate = 15;
  1767. int64 copyrightExpireDate = 16;
  1768. int64 status = 17;
  1769. int64 createTime = 18;
  1770. int64 updateTime = 19;
  1771. string ghostCutId = 20;
  1772. int64 recommend = 21;
  1773. string otherConfig = 22;
  1774. repeated ShortDramaLanguageVo shortDramaLanguages = 23;
  1775. int64 mainEpisodeCount = 24;
  1776. int64 trailerEpisodeCount = 25;
  1777. int64 copyrightId = 26;
  1778. int64 creator = 27;
  1779. int64 modifier = 28;
  1780. string operationTags = 29;
  1781. string extraInfo = 30;
  1782. int64 schedulePublishTime = 31;
  1783. int64 publishTime = 32;
  1784. }
  1785. message ShortDramaGetReq {
  1786. ShortDramaVo vo = 1;
  1787. string productCode = 2;
  1788. string countryCode = 3;
  1789. string lang = 4;
  1790. }
  1791. message ShortDramaListReq {
  1792. Page page = 1;
  1793. ShortDramaVo vo = 2;
  1794. repeated int64 excludeIds = 3;
  1795. string productCode = 4;
  1796. string countryCode = 5;
  1797. string lang = 6;
  1798. string publishTimeStart = 7;
  1799. string publishTimeEnd = 8;
  1800. repeated int64 statusList = 9;
  1801. }
  1802. message ShortDramaListResp {
  1803. int64 total = 1;
  1804. repeated ShortDramaVo list = 2;
  1805. }
  1806. message ShortDramaLanguageListReq {
  1807. Page page = 1;
  1808. ShortDramaLanguageVo vo = 2;
  1809. }
  1810. message ShortDramaLanguageListResp {
  1811. int64 total = 1;
  1812. repeated ShortDramaLanguageVo list = 2;
  1813. }
  1814. message ShortDramaEpisodeCountVo {
  1815. int64 dramaId = 1;
  1816. int64 episodeCount = 2;
  1817. }
  1818. message ShortDramaEpisodeCountReq {
  1819. Page page = 1;
  1820. Status status = 2;
  1821. int64 type = 3;
  1822. repeated int64 dramaIds = 4;
  1823. }
  1824. message ShortDramaEpisodeCountResp {
  1825. int64 total = 1;
  1826. repeated ShortDramaEpisodeCountVo list = 2;
  1827. }
  1828. message ShortDramaCheckNameReq {
  1829. string title = 1; // 短剧名称
  1830. int64 id = 2; // 编辑时排除当前短剧ID
  1831. }
  1832. message ShortDramaCheckNameResp {
  1833. bool exists = 1; // 是否存在
  1834. }
  1835. message ShortDramaUpdateModifierReq {
  1836. int64 id = 1;
  1837. int64 modifier = 2;
  1838. }
  1839. message ShortDramaUpdateReleaseRegionsReq {
  1840. int64 id = 1;
  1841. string releaseRegions = 2;
  1842. }
  1843. message ShortDramaCopyrightInfoVo {
  1844. int64 id = 1;
  1845. int64 copyrightId = 2;
  1846. string releaseRegions = 3;
  1847. }
  1848. message ShortDramaFindIdsWithCopyrightResp {
  1849. repeated ShortDramaCopyrightInfoVo list = 1;
  1850. }
  1851. message SetTotalStatsReq {
  1852. int64 dramaId = 1;
  1853. string country = 2;
  1854. int64 todayPlayCount = 3;
  1855. int64 weeklyPlayCount = 4;
  1856. int64 monthlyPlayCount = 5;
  1857. }
  1858. message ShortDramaStatsPlaysTotalVo {
  1859. int64 id = 1;
  1860. int64 dramaId = 2;
  1861. string country = 3;
  1862. int64 todayPlayCount = 4;
  1863. int64 weeklyPlayCount = 5;
  1864. int64 monthlyPlayCount = 6;
  1865. int64 createTime = 7;
  1866. int64 updateTime = 8;
  1867. }
  1868. message ShortDramaStatsPlaysTotalListReq {
  1869. Page page = 1;
  1870. string country = 2; // 国家代码
  1871. }
  1872. message ShortDramaStatsPlaysTotalListResp {
  1873. int64 total = 1;
  1874. repeated ShortDramaStatsPlaysTotalVo list = 2;
  1875. }
  1876. message FindSchedulePublishListReq { int64 status = 1; }
  1877. message FindSchedulePublishListResp { repeated ShortDramaVo list = 1; }
  1878. message PublishScheduleDramaReq {
  1879. repeated int64 ids = 1; // 短剧ID列表,支持批量操作
  1880. int64 targetStatus = 2; // 目标状态
  1881. }
  1882. service GoShortDramaClient {
  1883. // ShortDrama
  1884. rpc ShortDramaAdd(ShortDramaVo) returns (ShortDramaVo);
  1885. rpc ShortDramaUpdate(ShortDramaVo) returns (Empty);
  1886. rpc ShortDramaDel(Ids) returns (Empty);
  1887. rpc ShortDramaGet(ShortDramaGetReq) returns (ShortDramaVo);
  1888. rpc ShortDramaList(ShortDramaListReq) returns (ShortDramaListResp);
  1889. rpc ShortDramaUpdateModifier(ShortDramaUpdateModifierReq) returns (Empty);
  1890. rpc ShortDramaUpdateReleaseRegions(ShortDramaUpdateReleaseRegionsReq)
  1891. returns (Empty);
  1892. rpc ShortDramaFindIdsWithCopyright(Empty)
  1893. returns (ShortDramaFindIdsWithCopyrightResp);
  1894. rpc ShortDramaFindSchedulePublishList(FindSchedulePublishListReq)
  1895. returns (FindSchedulePublishListResp);
  1896. rpc ShortDramaPublishSchedule(PublishScheduleDramaReq) returns (Empty);
  1897. // ShortDramaLanguage
  1898. rpc ShortDramaLanguageList(ShortDramaLanguageListReq)
  1899. returns (ShortDramaLanguageListResp);
  1900. // ShortDramaEpisode
  1901. rpc ShortDramaEpisodeAdd(ShortDramaEpisodeVo) returns (ShortDramaEpisodeVo);
  1902. rpc ShortDramaEpisodeBatchAdd(ShortDramaEpisodeBatchAddReq) returns (Empty);
  1903. rpc ShortDramaEpisodeUpdate(ShortDramaEpisodeVo) returns (Empty);
  1904. rpc ShortDramaEpisodeDel(Ids) returns (Empty);
  1905. rpc ShortDramaEpisodeGet(ShortDramaEpisodeGetReq)
  1906. returns (ShortDramaEpisodeVo);
  1907. rpc ShortDramaEpisodeList(ShortDramaEpisodeListReq)
  1908. returns (ShortDramaEpisodeListResp);
  1909. rpc ShortDramaEpisodeBatchRefreshUpdateTime(
  1910. ShortDramaEpisodeBatchRefreshUpdateTimeReq) returns (Empty);
  1911. // ShortDramaEpisodeCount
  1912. rpc ShortDramaEpisodeCount(ShortDramaEpisodeCountReq)
  1913. returns (ShortDramaEpisodeCountResp);
  1914. rpc ShortDramaCheckName(ShortDramaCheckNameReq)
  1915. returns (ShortDramaCheckNameResp);
  1916. // ShortDramaStats
  1917. rpc SetTotalStats(SetTotalStatsReq) returns (Empty);
  1918. // ShortDramaStatsPlaysTotal
  1919. rpc ShortDramaStatsPlaysTotalList(ShortDramaStatsPlaysTotalListReq)
  1920. returns (ShortDramaStatsPlaysTotalListResp);
  1921. }
  1922. // 根据需要增加状态
  1923. message SysUserVo {
  1924. int64 id = 1; // ID
  1925. string username = 2; // 登录名
  1926. string password = 3; // 登录密码
  1927. string nickname = 4; // 昵称
  1928. string avatar = 5; // 头像
  1929. string email = 6; // 邮箱
  1930. string phone = 7; // 手机号
  1931. string remark = 8; // 备注
  1932. BoolInt isSuperAdmin = 9; // 是否为超级管理员 1是 2否
  1933. int64 permsLevel = 10; // 权限等级 值越大 权限越小
  1934. Status status = 11; // 状态 1正常 2冻结
  1935. int64 createTime = 12; // 创建时间
  1936. int64 updateTime = 13; // 修改时间
  1937. }
  1938. message SysRoleVo {
  1939. int64 id = 1; // ID
  1940. string productCode = 2; // 所属产品
  1941. string name = 3; // 角色名
  1942. string remark = 4; // 备注
  1943. Status status = 5; // 状态 1启用 2禁用
  1944. int64 createTime = 6; // 创建时间
  1945. int64 updateTime = 7; // 修改时间
  1946. int64 permsLevel = 8; // 权限等级 值越大 权限越小
  1947. }
  1948. message SysPermVo {
  1949. int64 id = 1; // ID
  1950. string name = 2; // 权限名
  1951. string code = 3; // 权限code
  1952. string remark = 4; // 备注
  1953. Status status = 5; // 状态 1启用 2禁用
  1954. int64 createTime = 6; // 创建时间
  1955. int64 updateTime = 7; // 修改时间
  1956. }
  1957. message SysUserRoleVo {
  1958. int64 id = 1; // ID
  1959. int64 userId = 2; // 用户ID
  1960. int64 roleId = 3; // 角色ID
  1961. int64 createTime = 4; // 创建时间
  1962. int64 updateTime = 5; // 修改时间
  1963. }
  1964. message SysRolePermVo {
  1965. int64 id = 1; // ID
  1966. int64 roleId = 2; // 角色ID
  1967. int64 permId = 3; // 权限ID
  1968. int64 createTime = 4; // 创建时间
  1969. int64 updateTime = 5; // 修改时间
  1970. }
  1971. message SysUserPermVo {
  1972. int64 id = 1; // ID
  1973. int64 userId = 2; // 用户ID
  1974. int64 permId = 3; // 权限ID
  1975. string effect = 4; // 权限控制策略 ALLOW允许 DENY拒绝
  1976. int64 createTime = 5; // 创建时间
  1977. int64 updateTime = 6; // 修改时间
  1978. }
  1979. message SysPermRule {
  1980. int64 permId = 1;
  1981. string effect = 2; // ALLOW允许 DENY拒绝
  1982. }
  1983. message SysUserWithRoleIdsAndPermRules {
  1984. SysUserVo user = 1; // 用户信息
  1985. repeated int64 roleIds = 2; // 角色
  1986. repeated SysPermRule permRules = 3; // 权限
  1987. }
  1988. message SysUserWithRolesAndPerms {
  1989. SysUserVo user = 1; // 用户信息
  1990. repeated SysRoleVo roles = 2; // 角色
  1991. repeated SysPermVo perms = 3; // 权限
  1992. }
  1993. message SysUserGetReq { SysUserVo vo = 1; }
  1994. message SysUserListReq {
  1995. Page page = 1;
  1996. SysUserVo vo = 2;
  1997. repeated int64 excludeIds = 3; // 排除的ID
  1998. }
  1999. message SysUserListResp {
  2000. int64 total = 1;
  2001. repeated SysUserVo list = 2;
  2002. }
  2003. message SysUserListWithRolesAndPermsResp {
  2004. int64 total = 1;
  2005. repeated SysUserWithRolesAndPerms list = 2;
  2006. }
  2007. message SysRoleWithPermIds {
  2008. SysRoleVo role = 1;
  2009. repeated int64 permIds = 2;
  2010. }
  2011. message SysRoleWithPerms {
  2012. SysRoleVo role = 1;
  2013. repeated SysPermVo perms = 2;
  2014. }
  2015. message SysRoleGetReq { SysRoleVo vo = 1; }
  2016. message SysRoleListReq {
  2017. Page page = 1;
  2018. SysRoleVo vo = 2;
  2019. repeated string productCodes = 3; // 所属产品
  2020. repeated int64 excludeIds = 4; // 排除的ID
  2021. }
  2022. message SysRoleListResp {
  2023. int64 total = 1;
  2024. repeated SysRoleVo list = 2;
  2025. }
  2026. message SysRoleListWithPermsResp {
  2027. int64 total = 1;
  2028. repeated SysRoleWithPerms list = 2;
  2029. }
  2030. message SysPermGetReq { SysPermVo vo = 1; }
  2031. message SysPermListReq {
  2032. Page page = 1;
  2033. SysPermVo vo = 2;
  2034. repeated int64 excludeIds = 3; // 排除的ID
  2035. }
  2036. message SysPermListResp {
  2037. int64 total = 1;
  2038. repeated SysPermVo list = 2;
  2039. }
  2040. message SysUserRoleGetReq { SysUserRoleVo vo = 1; }
  2041. message SysUserRoleListReq {
  2042. Page page = 1;
  2043. SysUserRoleVo vo = 2;
  2044. repeated int64 excludeIds = 3; // 排除的ID
  2045. }
  2046. message SysUserRoleListResp {
  2047. int64 total = 1;
  2048. repeated SysUserRoleVo list = 2;
  2049. }
  2050. message SysRolePermGetReq { SysRolePermVo vo = 1; }
  2051. message SysRolePermListReq {
  2052. Page page = 1;
  2053. SysRolePermVo vo = 2;
  2054. repeated int64 excludeIds = 3; // 排除的ID
  2055. }
  2056. message SysRolePermListResp {
  2057. int64 total = 1;
  2058. repeated SysRolePermVo list = 2;
  2059. }
  2060. message SysUserPermGetReq { SysUserPermVo vo = 1; }
  2061. message SysUserPermListReq {
  2062. Page page = 1;
  2063. SysUserPermVo vo = 2;
  2064. repeated int64 excludeIds = 3; // 排除的ID
  2065. }
  2066. message SysUserPermListResp {
  2067. int64 total = 1;
  2068. repeated SysUserPermVo list = 2;
  2069. }
  2070. service GoSysClient {
  2071. rpc Ping(Request) returns (Response);
  2072. // 用户管理
  2073. rpc SysUserAdd(SysUserVo) returns (SysUserVo);
  2074. rpc SysUserUpdate(SysUserVo) returns (SysUserVo);
  2075. rpc SysUserDelete(Ids) returns (Empty);
  2076. rpc SysUserGet(SysUserGetReq) returns (SysUserVo);
  2077. rpc SysUserList(SysUserListReq) returns (SysUserListResp);
  2078. rpc SysUserAddWithRolesAndPerms(SysUserWithRoleIdsAndPermRules) returns (SysUserWithRolesAndPerms);
  2079. rpc SysUserUpdateWithRolesAndPerms(SysUserWithRoleIdsAndPermRules) returns (SysUserWithRolesAndPerms);
  2080. rpc SysUserGetWithRolesAndPerms(SysUserGetReq) returns (SysUserWithRolesAndPerms);
  2081. rpc SysUserListWithRolesAndPerms(SysUserListReq) returns (SysUserListWithRolesAndPermsResp);
  2082. // 角色管理
  2083. rpc SysRoleAdd(SysRoleVo) returns (SysRoleVo);
  2084. rpc SysRoleUpdate(SysRoleVo) returns (SysRoleVo);
  2085. rpc SysRoleDelete(Ids) returns (Empty);
  2086. rpc SysRoleGet(SysRoleGetReq) returns (SysRoleVo);
  2087. rpc SysRoleList(SysRoleListReq) returns (SysRoleListResp);
  2088. rpc SysRoleAddWithPerms(SysRoleWithPermIds) returns (SysRoleWithPerms);
  2089. rpc SysRoleUpdateWithPerms(SysRoleWithPermIds) returns (SysRoleWithPerms);
  2090. rpc SysRoleGetWithPerms(SysRoleGetReq) returns (SysRoleWithPerms);
  2091. rpc SysRoleListWithPerms(SysRoleListReq) returns (SysRoleListWithPermsResp);
  2092. // 权限管理
  2093. rpc SysPermAdd(SysPermVo) returns (SysPermVo);
  2094. rpc SysPermUpdate(SysPermVo) returns (SysPermVo);
  2095. rpc SysPermDelete(Ids) returns (Empty);
  2096. rpc SysPermGet(SysPermGetReq) returns (SysPermVo);
  2097. rpc SysPermList(SysPermListReq) returns (SysPermListResp);
  2098. // 用户角色管理
  2099. rpc SysUserRoleAdd(SysUserRoleVo) returns (SysUserRoleVo);
  2100. rpc SysUserRoleUpdate(SysUserRoleVo) returns (SysUserRoleVo);
  2101. rpc SysUserRoleDelete(Ids) returns (Empty);
  2102. rpc SysUserRoleGet(SysUserRoleGetReq) returns (SysUserRoleVo);
  2103. rpc SysUserRoleList(SysUserRoleListReq) returns (SysUserRoleListResp);
  2104. // 角色权限管理
  2105. rpc SysRolePermAdd(SysRolePermVo) returns (SysRolePermVo);
  2106. rpc SysRolePermUpdate(SysRolePermVo) returns (SysRolePermVo);
  2107. rpc SysRolePermDelete(Ids) returns (Empty);
  2108. rpc SysRolePermGet(SysRolePermGetReq) returns (SysRolePermVo);
  2109. rpc SysRolePermList(SysRolePermListReq) returns (SysRolePermListResp);
  2110. // 用户权限管理
  2111. rpc SysUserPermAdd(SysUserPermVo) returns (SysUserPermVo);
  2112. rpc SysUserPermUpdate(SysUserPermVo) returns (SysUserPermVo);
  2113. rpc SysUserPermDelete(Ids) returns (Empty);
  2114. rpc SysUserPermGet(SysUserPermGetReq) returns (SysUserPermVo);
  2115. rpc SysUserPermList(SysUserPermListReq) returns (SysUserPermListResp);
  2116. }
  2117. // 白名单表
  2118. message UserWhiteVo {
  2119. int64 id = 1; // 主键ID
  2120. string userIdentifier = 2; // 用户
  2121. UserType userType = 3; // 用户类型 1 设备 2 账号
  2122. Status status = 4; // 状态
  2123. int64 createTime = 5; // 创建时间
  2124. int64 updateTime = 6; // 更新时间
  2125. }
  2126. // 测试用户表
  2127. message UserTestVo {
  2128. int64 id = 1; // 主键ID
  2129. string userIdentifier = 2; // 用户
  2130. UserType userType = 3; // 用户类型 1 设备 2 账号
  2131. string area = 4; // 指定地区
  2132. string apis = 5; // 指定接口
  2133. string routers = 6; // 指定路由
  2134. Status status = 7; // 状态
  2135. int64 createTime = 8; // 创建时间
  2136. int64 updateTime = 9; // 更新时间
  2137. }
  2138. // Account
  2139. message AccountVo {
  2140. int64 id = 1; // 主键ID
  2141. string userUuid = 2; // 用户UUID
  2142. string productCode = 3; // 产品ID
  2143. string username = 4; // 用户名
  2144. string password = 5; // 密码
  2145. string accountKey = 6; // 账号KEY
  2146. string accountPassword = 7; // 账号密码
  2147. int64 accountType = 8; // 账号类型
  2148. int64 registMode = 9; // 注册方式
  2149. string provider = 10; // 授权登录标识
  2150. BoolInt whitelistUser = 11; // 白名单用户
  2151. BoolInt activated = 12; // 是否激活
  2152. string config = 13; // 配置
  2153. Status status = 14; // 状态
  2154. string avatar = 15; // 头像
  2155. string area = 16; // 指定地区
  2156. string remark = 17; // 备注
  2157. string deviceId = 18; // 设备ID
  2158. string platform = 19; // 平台
  2159. string channel = 20; // 渠道
  2160. string deviceModel = 21; // 设备型号
  2161. string deviceOs = 22; // 设备系统
  2162. int64 timezone = 23; // 时区
  2163. string lang = 24; // 语言
  2164. string ip = 25; // IP
  2165. string country = 26; // 国家
  2166. string province = 27; // 省份
  2167. string city = 28; // 城市
  2168. string isp = 29; // ISP
  2169. int64 appVer = 30; // 产品版本号
  2170. int64 appRuntimeCode = 31; // 产品运行码
  2171. int64 createTime = 32; // 创建时间
  2172. int64 updateTime = 33; // 更新时间
  2173. string version = 34; // 数据版本
  2174. string sessionId = 35; // 登录凭证
  2175. int64 sessionCreateTime = 36; // 凭证创建时间
  2176. }
  2177. message AccountListReq {
  2178. Page page = 1;
  2179. AccountVo vo = 2;
  2180. repeated string productCodes = 3; // 产品code
  2181. repeated int64 excludeIds = 4; // 排除的ID
  2182. }
  2183. message AccountListResp {
  2184. int64 total = 1;
  2185. repeated AccountVo list = 2;
  2186. }
  2187. // AccountDevice
  2188. message AccountDeviceVo {
  2189. int64 id = 1;
  2190. int64 accountId = 2; // 用户ID
  2191. int64 deviceId = 3; // 设备ID
  2192. string sessionId = 4; // 登录凭证
  2193. int64 sessionCreateTime = 5; // 凭证创建时间
  2194. int64 updateTime = 6;
  2195. int64 createTime = 7;
  2196. }
  2197. message AccountDeviceListReq {
  2198. Page page = 1;
  2199. AccountDeviceVo vo = 2;
  2200. repeated int64 excludeIds = 3; // 排除的ID
  2201. }
  2202. message AccountDeviceListResp {
  2203. int64 total = 1;
  2204. repeated AccountDeviceVo list = 2;
  2205. }
  2206. message UserWhiteListReq {
  2207. Page page = 1;
  2208. UserWhiteVo vo = 2;
  2209. repeated int64 excludeIds = 3; // 排除的ID
  2210. }
  2211. message UserWhiteListResp {
  2212. int64 total = 1;
  2213. repeated UserWhiteVo list = 2;
  2214. }
  2215. message UserWhiteAddReq { UserWhiteVo vo = 1; }
  2216. message UserWhiteAddResp { UserWhiteVo vo = 1; }
  2217. message UserWhiteGetReq { UserWhiteVo vo = 1; }
  2218. message UserWhiteGetResp { UserWhiteVo vo = 1; }
  2219. message UserWhiteUpdateReq { UserWhiteVo vo = 1; }
  2220. message UserWhiteUpdateResp { UserWhiteVo vo = 1; }
  2221. message UserWhiteDelReq { repeated int64 ids = 1; }
  2222. message UserTestListReq {
  2223. Page page = 1;
  2224. UserTestVo vo = 2;
  2225. repeated int64 excludeIds = 3; // 排除的ID
  2226. }
  2227. message UserTestListResp {
  2228. int64 total = 1;
  2229. repeated UserTestVo list = 2;
  2230. }
  2231. message UserTestAddReq { UserTestVo vo = 1; }
  2232. message UserTestAddResp { UserTestVo vo = 1; }
  2233. message UserTestGetReq { UserTestVo vo = 1; }
  2234. message UserTestGetResp { UserTestVo vo = 1; }
  2235. message UserTestUpdateReq { UserTestVo vo = 1; }
  2236. message UserTestUpdateResp { UserTestVo vo = 1; }
  2237. message UserTestDelReq { repeated int64 ids = 1; }
  2238. // 用户服务订阅权益表
  2239. message UserServiceVo {
  2240. int64 id = 1; // 主键ID
  2241. string userUuid = 2; // 用户UUID
  2242. string productCode = 3; // 产品ID
  2243. int64 ownerId = 4; // 服务所有者ID
  2244. int64 servicePlanId = 5; // 内部套餐ID
  2245. int64 serviceChannelPlanId = 6; // 渠道套餐ID
  2246. // int64 serviceTypeId = 6; // 服务类型ID
  2247. int64 licenseDays = 7; // 授权天数
  2248. int64 licenseMinutes = 8; // 授权分钟数
  2249. int64 userLevel = 9; // 用户等级
  2250. int64 deviceLimit = 10; // 设备数量限制
  2251. int64 speedLimit = 11; // 速度限制
  2252. int64 trafficLimit = 12; // 流量限制
  2253. // int64 state = 13; // 状态
  2254. Status status = 14; // 状态
  2255. int64 createTime = 15; // 创建时间
  2256. int64 updateTime = 16; // 更新时间
  2257. int64 startTime = 17; // 套餐开始时间
  2258. }
  2259. message UserServiceAddReq { UserServiceVo vo = 1; }
  2260. message UserServiceAddResp { UserServiceVo vo = 1; }
  2261. message UserServiceUpdateReq { UserServiceVo vo = 1; }
  2262. message UserServiceUpdateResp { UserServiceVo vo = 1; }
  2263. message UserServiceDelReq { repeated int64 ids = 1; }
  2264. message UserServiceGetReq { UserServiceVo vo = 1; }
  2265. message UserServiceGetResp { UserServiceVo vo = 1; }
  2266. message UserServiceListReq {
  2267. Page page = 1;
  2268. UserServiceVo vo = 2;
  2269. repeated int64 excludeIds = 3; // 排除的ID
  2270. repeated int64 userIds = 4; // 用户ID
  2271. repeated int64 dids = 5; // device 表的 id
  2272. }
  2273. message UserServiceListResp {
  2274. int64 total = 1;
  2275. repeated UserServiceVo list = 2;
  2276. }
  2277. message DeviceVo {
  2278. int64 id = 1;
  2279. string userUuid = 2;
  2280. string productCode = 3;
  2281. string deviceId = 4;
  2282. string accountKey = 5;
  2283. string accountPassword = 6;
  2284. string platform = 7;
  2285. string channel = 8;
  2286. string referChannel = 9;
  2287. string deviceModel = 10;
  2288. string deviceOs = 11;
  2289. int64 timezone = 12;
  2290. string lang = 13;
  2291. int64 appVer = 14;
  2292. string ip = 15;
  2293. string country = 16;
  2294. string province = 17;
  2295. string city = 18;
  2296. string isp = 19;
  2297. int64 createTime = 20;
  2298. int64 updateTime = 21;
  2299. Status status = 22;
  2300. string refer = 23;
  2301. int64 whitelistUser = 24; // 白名单用户 1正常用户 2: 白名单用户
  2302. int64 testUser = 25; // 测试用户 1正常用户 2: 测试用户
  2303. string mockCountry = 26; // 指定国家
  2304. string mockApi = 27; // 指定API
  2305. string mockRouter = 28; // 指定路由
  2306. string referSubChannel = 29;
  2307. string firebaseToken = 30; // firebase token
  2308. string appVerName = 31; // 版本
  2309. }
  2310. message DeviceListReq {
  2311. Page page = 1;
  2312. DeviceVo vo = 2;
  2313. repeated string productCodes = 3; // 产品code
  2314. repeated int64 excludeIds = 4; // 排除的ID
  2315. repeated string dateRange = 5; // 日期范围
  2316. int64 createStartTime = 6; // 创建开始时间
  2317. int64 createEndTime = 7; // 创建结束时间
  2318. repeated string deviceIds = 8; // 设备IDs
  2319. string country = 9; // 国家
  2320. string vn = 10; // 运营商
  2321. }
  2322. message DeviceListRes {
  2323. int64 total = 1;
  2324. repeated DeviceVo list = 2;
  2325. }
  2326. message UserAppConfigVo {
  2327. int64 id = 1;
  2328. string deviceId = 2;
  2329. string key = 3;
  2330. string value = 4;
  2331. Status status = 5;
  2332. int64 createTime = 6;
  2333. int64 updateTime = 7;
  2334. }
  2335. message UserAppConfigGetReq { UserAppConfigVo vo = 1; }
  2336. message UserAppConfigListReq {
  2337. Page page = 1;
  2338. UserAppConfigVo vo = 2;
  2339. }
  2340. message UserAppConfigListRes {
  2341. int64 total = 1;
  2342. repeated UserAppConfigVo list = 2;
  2343. }
  2344. message UserVo {
  2345. int64 id = 1; // ID
  2346. string productCode = 2; // 产品标识
  2347. string uuid = 3; // 用户唯一ID
  2348. string deviceId = 4; // 注册时使用的设备ID
  2349. int64 accountType = 5; // 值为1时表示实体尚未注册账号, 为其他值时表示实体已经注册了账号(为了让 productCode+deviceId+accountType 能唯一确定一个用户)
  2350. string registType = 6; // 注册方式 normal email phone wechat qq google apple (其实可以通过查询 user_credential 中最早的一条记录的 identityType 来确定)
  2351. int64 registFrom = 7; // 从哪里注册 0: unknown 1: guest 2: app 3: web 4: pc 9999: invalid
  2352. string referChannel = 8; // 推广渠道
  2353. string referSubChannel = 9; // 推广子渠道
  2354. string nickname = 10; // 用户昵称
  2355. string avatar = 11; // 用户头像地址
  2356. string config = 12; // 保留字段,用于扩展
  2357. Status status = 13; // 状态 1: 正常 2: 冻结
  2358. int64 createTime = 14; // 创建时间
  2359. int64 updateTime = 15; // 修改时间
  2360. }
  2361. message UserAddReq { UserVo vo = 1; }
  2362. message UserAddResp { UserVo vo = 1; }
  2363. message UserUpdateReq { UserVo vo = 1; }
  2364. message UserUpdateResp { UserVo vo = 1; }
  2365. message UserDelReq { repeated int64 ids = 1; }
  2366. message UserGetReq { UserVo vo = 1; }
  2367. message UserGetResp { UserVo vo = 1; }
  2368. message UserListReq {
  2369. Page page = 1;
  2370. UserVo vo = 2;
  2371. repeated int64 excludeIds = 3; // 排除的ID
  2372. repeated string productCodes = 4; // 产品code
  2373. repeated string uuids = 5; // 用户唯一ID
  2374. repeated string deviceIds = 6; // 设备ID (device 表的 id)
  2375. string credentialKeyword = 7; // 登录凭证模糊搜索(匹配 user_credential.identifier)
  2376. }
  2377. message UserListResp {
  2378. int64 total = 1;
  2379. repeated UserVo list = 2;
  2380. }
  2381. message UserCredentialVo {
  2382. int64 id = 1; // ID
  2383. int64 userId = 2; // 用户ID
  2384. string productCode = 3; // 产品标识
  2385. string identityType = 4; // 凭证类型: username, email, phone, wechat, qq, google, apple 等
  2386. string identifier = 5; // 凭证标识
  2387. string credential = 6; // 凭证密钥(密码/token)
  2388. int64 isVerified = 7; // 是否已验证 1: 已验证 2: 未验证
  2389. int64 registFrom = 8; // 从哪里注册 0: unknown 1: guest 2: app 3: web 4: pc 9999: invalid
  2390. Status status = 9; // 状态 1: 正常 2: 禁用
  2391. int64 createTime = 10; // 创建时间/注册时间
  2392. int64 updateTime = 11; // 更新时间
  2393. }
  2394. message UserCredentialAddReq { UserCredentialVo vo = 1; }
  2395. message UserCredentialAddResp { UserCredentialVo vo = 1; }
  2396. message UserCredentialUpdateReq { UserCredentialVo vo = 1; }
  2397. message UserCredentialUpdateResp { UserCredentialVo vo = 1; }
  2398. message UserCredentialDelReq { repeated int64 ids = 1; }
  2399. message UserCredentialGetReq { UserCredentialVo vo = 1; }
  2400. message UserCredentialGetResp { UserCredentialVo vo = 1; }
  2401. message UserCredentialListReq {
  2402. Page page = 1;
  2403. UserCredentialVo vo = 2;
  2404. repeated int64 excludeIds = 3; // 排除的ID
  2405. repeated int64 userIds = 4; // 用户ID
  2406. }
  2407. message UserCredentialListResp {
  2408. int64 total = 1;
  2409. repeated UserCredentialVo list = 2;
  2410. }
  2411. message UserDeviceVo {
  2412. int64 id = 1; // ID
  2413. int64 userId = 2; // 用户ID
  2414. int64 did = 3; // 设备ID
  2415. string sessionId = 4; // 登录凭证
  2416. int64 sessionCreateTime = 5; // 凭证创建时间
  2417. Status status = 6; // 状态 1: 正常 2: 禁用
  2418. int64 updateTime = 7; // 更新时间
  2419. int64 createTime = 8; // 创建时间
  2420. }
  2421. message UserDeviceAddReq { UserDeviceVo vo = 1; }
  2422. message UserDeviceAddResp { UserDeviceVo vo = 1; }
  2423. message UserDeviceUpdateReq { UserDeviceVo vo = 1; }
  2424. message UserDeviceUpdateResp { UserDeviceVo vo = 1; }
  2425. message UserDeviceDelReq { repeated int64 ids = 1; }
  2426. message UserDeviceGetReq { UserDeviceVo vo = 1; }
  2427. message UserDeviceGetResp { UserDeviceVo vo = 1; }
  2428. message UserDeviceListReq {
  2429. Page page = 1;
  2430. UserDeviceVo vo = 2;
  2431. repeated int64 excludeIds = 3; // 排除的ID
  2432. repeated int64 userIds = 4; // 用户ID
  2433. repeated int64 dids = 5; // device 表的 id
  2434. }
  2435. message UserDeviceListResp {
  2436. int64 total = 1;
  2437. repeated UserDeviceVo list = 2;
  2438. }
  2439. // 用户模块
  2440. service GoUserClient {
  2441. rpc Ping(Request) returns (Response);
  2442. // 用户app配置管理(ring)
  2443. rpc UserAppConfigAdd(UserAppConfigVo) returns (UserAppConfigVo);
  2444. rpc UserAppConfigUpdate(UserAppConfigVo) returns (UserAppConfigVo);
  2445. rpc UserAppConfigDel(Ids) returns (Empty);
  2446. rpc UserAppConfigGet(UserAppConfigGetReq) returns (UserAppConfigVo);
  2447. rpc UserAppConfigList(UserAppConfigListReq) returns (UserAppConfigListRes);
  2448. // Device Model
  2449. // DeviceAdd
  2450. rpc DeviceAdd(DeviceVo) returns (DeviceVo);
  2451. rpc DeviceUpdate(DeviceVo) returns (DeviceVo);
  2452. rpc DeviceDel(Ids) returns (Empty);
  2453. rpc DeviceGet(DeviceVo) returns (DeviceVo);
  2454. rpc DeviceList(DeviceListReq) returns (DeviceListRes);
  2455. // Account Model
  2456. // AccountAdd
  2457. rpc AccountAdd(AccountVo) returns (AccountVo);
  2458. rpc AccountUpdate(AccountVo) returns (AccountVo);
  2459. rpc AccountDel(Ids) returns (Empty);
  2460. rpc AccountGet(AccountVo) returns (AccountVo);
  2461. rpc AccountList(AccountListReq) returns (AccountListResp);
  2462. // AccountDevice Model
  2463. // AccountDeviceAdd
  2464. rpc AccountDeviceAdd(AccountDeviceVo) returns (AccountDeviceVo);
  2465. rpc AccountDeviceUpdate(AccountDeviceVo) returns (AccountDeviceVo);
  2466. rpc AccountDeviceDel(Ids) returns (Empty);
  2467. rpc AccountDeviceGet(AccountDeviceVo) returns (AccountDeviceVo);
  2468. rpc AccountDeviceList(AccountDeviceListReq) returns (AccountDeviceListResp);
  2469. // 用户白名单管理
  2470. rpc UserWhiteAdd(UserWhiteAddReq) returns (UserWhiteAddResp);
  2471. rpc UserWhiteUpdate(UserWhiteUpdateReq) returns (UserWhiteUpdateResp);
  2472. rpc UserWhiteDel(UserWhiteDelReq) returns (Empty);
  2473. rpc UserWhiteGet(UserWhiteGetReq) returns (UserWhiteGetResp);
  2474. rpc UserWhiteList(UserWhiteListReq) returns (UserWhiteListResp);
  2475. // 测试用户管理
  2476. rpc UserTestAdd(UserTestAddReq) returns (UserTestAddResp);
  2477. rpc UserTestUpdate(UserTestUpdateReq) returns (UserTestUpdateResp);
  2478. rpc UserTestDel(UserTestDelReq) returns (Empty);
  2479. rpc UserTestGet(UserTestGetReq) returns (UserTestGetResp);
  2480. rpc UserTestList(UserTestListReq) returns (UserTestListResp);
  2481. // User Model
  2482. // UserAdd
  2483. rpc UserAdd(UserAddReq) returns (UserAddResp);
  2484. rpc UserUpdate(UserUpdateReq) returns (UserUpdateResp);
  2485. rpc UserDel(UserDelReq) returns (Empty);
  2486. rpc UserGet(UserGetReq) returns (UserGetResp);
  2487. rpc UserList(UserListReq) returns (UserListResp);
  2488. // UserCredential Model
  2489. // UserCredentialAdd
  2490. rpc UserCredentialAdd(UserCredentialAddReq) returns (UserCredentialAddResp);
  2491. rpc UserCredentialUpdate(UserCredentialUpdateReq) returns (UserCredentialUpdateResp);
  2492. rpc UserCredentialDel(UserCredentialDelReq) returns (Empty);
  2493. rpc UserCredentialGet(UserCredentialGetReq) returns (UserCredentialGetResp);
  2494. rpc UserCredentialList(UserCredentialListReq) returns (UserCredentialListResp);
  2495. // UserDevice Model
  2496. // UserDeviceAdd
  2497. rpc UserDeviceAdd(UserDeviceAddReq) returns (UserDeviceAddResp);
  2498. rpc UserDeviceUpdate(UserDeviceUpdateReq) returns (UserDeviceUpdateResp);
  2499. rpc UserDeviceDel(UserDeviceDelReq) returns (Empty);
  2500. rpc UserDeviceGet(UserDeviceGetReq) returns (UserDeviceGetResp);
  2501. rpc UserDeviceList(UserDeviceListReq) returns (UserDeviceListResp);
  2502. //UserService
  2503. rpc UserServiceAdd(UserServiceAddReq) returns (UserServiceAddResp);
  2504. rpc UserServiceUpdate(UserServiceUpdateReq) returns (UserServiceUpdateResp);
  2505. rpc UserServiceDel(UserServiceDelReq) returns (Empty);
  2506. rpc UserServiceGet(UserServiceGetReq) returns (UserServiceGetResp);
  2507. rpc UserServiceList(UserServiceListReq) returns (UserServiceListResp);
  2508. }
  2509. // VpnTag
  2510. message VpnTagVo {
  2511. int64 id = 1;
  2512. string productCode = 2;
  2513. string type = 3;
  2514. string name = 4;
  2515. int64 sort = 5;
  2516. Status status = 6;
  2517. string remark = 7;
  2518. int64 createTime = 8;
  2519. int64 updateTime = 9;
  2520. string otherConfig = 10;
  2521. }
  2522. message VpnTagGetReq { VpnTagVo vo = 1; }
  2523. message VpnTagListReq {
  2524. Page page = 1;
  2525. VpnTagVo vo = 2;
  2526. repeated string productCodes = 3;
  2527. repeated int64 excludeIds = 4;
  2528. }
  2529. message VpnTagListResp {
  2530. int64 total = 1;
  2531. repeated VpnTagVo list = 2;
  2532. }
  2533. message VpnTagBatchAddReq { repeated VpnTagVo list = 1; }
  2534. message VpnTagBatchAddResp { repeated VpnTagVo list = 1; }
  2535. message VpnTagBatchUpdateReq { repeated VpnTagVo list = 1; }
  2536. message VpnTagBatchUpdateResp { repeated VpnTagVo list = 1; }
  2537. message VpnTagBatchDelReq { repeated int64 ids = 1; }
  2538. // VpnTag
  2539. message VpnGroupVo {
  2540. int64 id = 1;
  2541. string productCode = 2;
  2542. string name = 3;
  2543. string icon = 4;
  2544. int64 sort = 5;
  2545. Status status = 6;
  2546. string remark = 7;
  2547. int64 createTime = 8;
  2548. int64 updateTime = 9;
  2549. string version = 10;
  2550. string otherConfig = 11;
  2551. }
  2552. message VpnGroupExVo {
  2553. VpnGroupVo vo = 1;
  2554. repeated int64 tagIds = 2;
  2555. }
  2556. message VpnGroupAddReq {
  2557. VpnGroupVo vo = 1;
  2558. repeated int64 tagIds = 2;
  2559. }
  2560. message VpnGroupGetReq { VpnGroupVo vo = 1; }
  2561. message VpnGroupListReq {
  2562. Page page = 1;
  2563. VpnGroupVo vo = 2;
  2564. repeated string productCodes = 3;
  2565. repeated int64 excludeIds = 4;
  2566. }
  2567. message VpnGroupListResp {
  2568. int64 total = 1;
  2569. repeated VpnGroupVo list = 2;
  2570. }
  2571. message VpnGroupBatchAddReq { repeated VpnGroupExVo list = 1; }
  2572. message VpnGroupBatchAddResp { repeated VpnGroupExVo list = 1; }
  2573. message VpnGroupBatchUpdateReq { repeated VpnGroupExVo list = 1; }
  2574. message VpnGroupBatchUpdateResp { repeated VpnGroupExVo list = 1; }
  2575. message VpnGroupBatchDelReq { repeated int64 ids = 1; }
  2576. // VpnGroupTag
  2577. message VpnGroupTagVo {
  2578. int64 id = 1;
  2579. int64 groupId = 2;
  2580. int64 tagId = 3;
  2581. int64 createTime = 4;
  2582. int64 updateTime = 5;
  2583. }
  2584. message VpnGroupTagListReq {
  2585. Page page = 1;
  2586. VpnGroupTagVo vo = 2;
  2587. repeated int64 groupIds = 3;
  2588. repeated int64 tagIds = 4;
  2589. }
  2590. message VpnGroupTagListResp {
  2591. int64 total = 1;
  2592. repeated VpnGroupTagVo list = 2;
  2593. }
  2594. // VpnLocation
  2595. message VpnLocationVo {
  2596. int64 id = 1;
  2597. int64 groupId = 2;
  2598. string name = 3;
  2599. string code = 4;
  2600. string icon = 5;
  2601. int64 type = 6;
  2602. string displayPolicyConfig = 7;
  2603. string routePolicyConfig = 8;
  2604. int64 sort = 9;
  2605. Status status = 10;
  2606. string remark = 11;
  2607. int64 createTime = 12;
  2608. int64 updateTime = 13;
  2609. string version = 14;
  2610. string otherConfig = 15;
  2611. }
  2612. message VpnLocationExVo {
  2613. VpnLocationVo vo = 1;
  2614. string productCode = 2;
  2615. }
  2616. message VpnLocationGetReq { VpnLocationVo vo = 1; }
  2617. message VpnLocationListReq {
  2618. Page page = 1;
  2619. VpnLocationExVo vo = 2;
  2620. repeated int64 groupIds = 3;
  2621. repeated int64 excludeIds = 4;
  2622. repeated string productCodes = 5;
  2623. }
  2624. message VpnLocationListResp {
  2625. int64 total = 1;
  2626. repeated VpnLocationExVo list = 2;
  2627. }
  2628. message VpnLocationBatchAddReq { repeated VpnLocationVo list = 1; }
  2629. message VpnLocationBatchAddResp { repeated VpnLocationExVo list = 1; }
  2630. message VpnLocationBatchUpdateReq { repeated VpnLocationVo list = 1; }
  2631. message VpnLocationBatchUpdateResp { repeated VpnLocationExVo list = 1; }
  2632. message VpnLocationBatchDelReq { repeated int64 ids = 1; }
  2633. // VpnServer
  2634. message VpnServerVo {
  2635. int64 id = 1;
  2636. int64 instanceId = 2;
  2637. string name = 3;
  2638. string ip = 4;
  2639. int64 port = 5;
  2640. int64 pingPort = 6;
  2641. string netConfig = 7;
  2642. string routePolicyConfig = 8;
  2643. string serverInfo = 9;
  2644. Status status = 10;
  2645. string remark = 11;
  2646. int64 createTime = 12;
  2647. int64 updateTime = 13;
  2648. string version = 14;
  2649. string otherInfo = 15;
  2650. int64 monitorPort = 16;
  2651. string vpnConfig = 17;
  2652. }
  2653. message VpnServerExVo {
  2654. VpnServerVo vo = 1;
  2655. repeated int64 locationIds = 2;
  2656. }
  2657. message VpnServerListReq {
  2658. Page page = 1;
  2659. VpnServerVo vo = 2;
  2660. repeated int64 excludeIds = 3; // 排除的ID
  2661. repeated string productCodes = 4;
  2662. repeated int64 locationIds = 5;
  2663. repeated int64 instanceIds = 6;
  2664. }
  2665. message VpnServerListResp {
  2666. int64 total = 1;
  2667. repeated VpnServerVo list = 2;
  2668. }
  2669. message VpnServerExListResp {
  2670. int64 total = 1;
  2671. repeated VpnServerExVo list = 2;
  2672. }
  2673. message VpnServerAddReq {
  2674. VpnServerVo vo = 1;
  2675. repeated int64 locationIds = 2;
  2676. }
  2677. message VpnServerBatchAddReq { repeated VpnServerExVo list = 1; }
  2678. message VpnServerBatchAddResp { repeated VpnServerExVo list = 1; }
  2679. message VpnServerBatchUpdateReq { repeated VpnServerExVo list = 1; }
  2680. message VpnServerBatchUpdateResp { repeated VpnServerExVo list = 1; }
  2681. message VpnServerBatchDelReq { repeated int64 ids = 1; }
  2682. message VpnServerLocationVo {
  2683. int64 id = 1;
  2684. int64 serverId = 2;
  2685. int64 locationId = 3;
  2686. int64 createTime = 4;
  2687. int64 updateTime = 5;
  2688. Status status = 6;
  2689. }
  2690. message VpnServerLocationListReq {
  2691. Page page = 1;
  2692. VpnServerLocationVo vo = 2;
  2693. repeated int64 serverIds = 3;
  2694. repeated int64 locationIds = 4;
  2695. }
  2696. message VpnServerLocationListResp {
  2697. int64 total = 1;
  2698. repeated VpnServerLocationVo list = 2;
  2699. }
  2700. message VpnLocationServerCountVo {
  2701. int64 locationId = 1;
  2702. int64 serverCount = 2;
  2703. }
  2704. message VpnLocationServerCountReq {
  2705. Page page = 1;
  2706. Status status = 2;
  2707. repeated int64 serverIds = 3;
  2708. repeated int64 locationIds = 4;
  2709. }
  2710. message VpnLocationServerCountResp {
  2711. int64 total = 1;
  2712. repeated VpnLocationServerCountVo list = 2;
  2713. }
  2714. message VpnProbeTaskVo {
  2715. int64 id = 1;
  2716. string taskId = 2;
  2717. string filter = 3; // 筛选条件
  2718. string type = 4; // 类型
  2719. string uploadDomain = 5; // 配置
  2720. string params = 6;
  2721. int64 answer = 7;
  2722. float percentage = 8; // 进度百分比
  2723. string result = 9; // 结果
  2724. int64 userId = 10;
  2725. int64 createTime = 11;
  2726. int64 updateTime = 12;
  2727. }
  2728. message VpnProbeTaskListReq {
  2729. Page page = 1;
  2730. VpnProbeTaskVo vo = 2;
  2731. }
  2732. message VpnProbeTaskListResp {
  2733. int64 total = 1;
  2734. repeated VpnProbeTaskVo list = 2;
  2735. }
  2736. message VpnWithIPAndPortReq {
  2737. // 产品Code
  2738. string productCode = 1;
  2739. // 国家
  2740. string country = 2;
  2741. // 需要随机的总数
  2742. int64 limitCount = 3;
  2743. }
  2744. message VpnWithIPAndPortResp {
  2745. repeated VpnServerVo list = 1;
  2746. }
  2747. // VpnipWalledVo
  2748. message VpnipWalledVo {
  2749. int64 id = 1; // ID
  2750. int64 ipId = 2; // IP ID
  2751. string area = 3; // 地区
  2752. int64 walledTime = 4; // 被墙时间
  2753. string remark = 5; // 备注
  2754. int64 createTime = 6; // 创建时间
  2755. int64 createAt = 7; // 创建者ID
  2756. int64 updateTime = 8; // 更新时间
  2757. int64 updateAt = 9; // 更新者ID
  2758. }
  2759. message VpnipWalledAddReq { VpnipWalledVo vo = 1; }
  2760. message VpnipWalledAddResp { VpnipWalledVo vo = 1; }
  2761. message VpnipWalledUpdateReq { VpnipWalledVo vo = 1; }
  2762. message VpnipWalledUpdateResp { VpnipWalledVo vo = 1; }
  2763. message VpnipWalledGetReq { VpnipWalledVo vo = 1; }
  2764. message VpnipWalledGetResp { VpnipWalledVo vo = 1; }
  2765. message VpnipWalledListReq {
  2766. Page page = 1;
  2767. VpnipWalledVo vo = 2;
  2768. repeated int64 excludeIds = 3;
  2769. repeated int64 ipIds = 4;
  2770. repeated string ips = 5;
  2771. repeated string areas = 6;
  2772. }
  2773. message VpnipWalledListResp {
  2774. int64 total = 1;
  2775. repeated VpnipWalledVo list = 2;
  2776. }
  2777. message VpnipWalledBatchAddReq { repeated VpnipWalledVo list = 1; }
  2778. message VpnipWalledBatchAddResp { repeated VpnipWalledVo list = 1; }
  2779. message VpnipWalledBatchUpdateReq { repeated VpnipWalledVo list = 1; }
  2780. message VpnipWalledBatchUpdateResp { repeated VpnipWalledVo list = 1; }
  2781. // VpnipVo
  2782. message VpnipVo {
  2783. int64 id = 1; // ID
  2784. int64 rangeId = 2; // IP段ID
  2785. string ip = 3; // IP地址
  2786. string otherInfo = 4; // 其他信息,保留字段,用于扩展
  2787. Status status = 5; // 状态
  2788. string remark = 6; // 备注
  2789. int64 createTime = 7; // 创建时间
  2790. int64 createAt = 8; // 创建者ID
  2791. int64 updateTime = 9; // 更新时间
  2792. int64 updateAt = 10; // 更新者ID
  2793. }
  2794. message VpnipExVo {
  2795. VpnipVo vo = 1;
  2796. repeated VpnipWalledVo walledInfos = 2;
  2797. }
  2798. message VpnipAddReq { VpnipVo vo = 1; }
  2799. message VpnipAddResp { VpnipVo vo = 1; }
  2800. message VpnipExAddReq { VpnipExVo vo = 1; }
  2801. message VpnipExAddResp { VpnipExVo vo = 1; }
  2802. message VpnipUpdateReq { VpnipVo vo = 1; }
  2803. message VpnipUpdateResp { VpnipVo vo = 1; }
  2804. message VpnipExUpdateReq { VpnipExVo vo = 1; }
  2805. message VpnipExUpdateResp { VpnipExVo vo = 1; }
  2806. message VpnipGetReq { VpnipVo vo = 1; }
  2807. message VpnipGetResp { VpnipVo vo = 1; }
  2808. message VpnipExGetResp { VpnipExVo vo = 1; }
  2809. message VpnipListReq {
  2810. Page page = 1;
  2811. VpnipVo vo = 2;
  2812. repeated int64 excludeIds = 3;
  2813. repeated string ips = 4;
  2814. repeated int64 serverIds = 5;
  2815. repeated int64 instanceIds = 6;
  2816. repeated int64 rangeIds = 7;
  2817. }
  2818. message VpnipListResp {
  2819. int64 total = 1;
  2820. repeated VpnipVo list = 2;
  2821. }
  2822. message VpnipExListResp {
  2823. int64 total = 1;
  2824. repeated VpnipExVo list = 2;
  2825. }
  2826. message VpnipBatchAddReq { repeated VpnipVo list = 1; }
  2827. message VpnipBatchAddResp { repeated VpnipVo list = 1; }
  2828. message VpnipBatchUpdateReq { repeated VpnipVo list = 1; }
  2829. message VpnipBatchUpdateResp { repeated VpnipVo list = 1; }
  2830. message VpnipExBatchAddReq { repeated VpnipExVo list = 1; }
  2831. message VpnipExBatchAddResp { repeated VpnipExVo list = 1; }
  2832. message VpnipExBatchUpdateReq { repeated VpnipExVo list = 1; }
  2833. message VpnipExBatchUpdateResp { repeated VpnipExVo list = 1; }
  2834. // VpnipRangeVo
  2835. message VpnipRangeVo {
  2836. int64 id = 1; // ID
  2837. string name = 2; // 名称
  2838. string supplierId = 3; // 供应商ID
  2839. string startIP = 4; // 起始IP
  2840. string endIP = 5; // 结束IP
  2841. int64 expires = 6; // 到期日期
  2842. int64 sort = 7; // 排序
  2843. Status status = 8; // 状态
  2844. string remark = 9; // 备注
  2845. int64 createTime = 10; // 创建时间
  2846. int64 createAt = 11; // 创建者ID
  2847. int64 updateTime = 12; // 更新时间
  2848. int64 updateAt = 13; // 更新者ID
  2849. }
  2850. message VpnipRangeExVo {
  2851. VpnipRangeVo vo = 1;
  2852. repeated VpnipVo ipInfos = 2;
  2853. }
  2854. message VpnipRangeAddReq { VpnipRangeVo vo = 1; }
  2855. message VpnipRangeAddResp { VpnipRangeVo vo = 1; }
  2856. message VpnipRangeExAddReq { VpnipRangeExVo vo = 1; }
  2857. message VpnipRangeExAddResp { VpnipRangeExVo vo = 1; }
  2858. message VpnipRangeUpdateReq { VpnipRangeVo vo = 1; }
  2859. message VpnipRangeUpdateResp { VpnipRangeVo vo = 1; }
  2860. message VpnipRangeExUpdateReq { VpnipRangeExVo vo = 1; }
  2861. message VpnipRangeExUpdateResp { VpnipRangeExVo vo = 1; }
  2862. message VpnipRangeGetReq { VpnipRangeVo vo = 1; }
  2863. message VpnipRangeGetResp { VpnipRangeVo vo = 1; }
  2864. message VpnipRangeExGetResp { VpnipRangeExVo vo = 1; }
  2865. message VpnipRangeListReq {
  2866. Page page = 1;
  2867. VpnipRangeVo vo = 2;
  2868. repeated string names = 3;
  2869. repeated string ips = 4;
  2870. repeated int64 excludeIds = 5; // 排除的ID
  2871. }
  2872. message VpnipRangeListResp {
  2873. int64 total = 1;
  2874. repeated VpnipRangeVo list = 2;
  2875. }
  2876. message VpnipRangeExListResp {
  2877. int64 total = 1;
  2878. repeated VpnipRangeExVo list = 2;
  2879. }
  2880. message VpnipRangeBatchAddReq { repeated VpnipRangeVo list = 1; }
  2881. message VpnipRangeBatchAddResp { repeated VpnipRangeVo list = 1; }
  2882. message VpnipRangeBatchUpdateReq { repeated VpnipRangeVo list = 1; }
  2883. message VpnipRangeBatchUpdateResp { repeated VpnipRangeVo list = 1; }
  2884. message VpnipRangeExBatchAddReq { repeated VpnipRangeExVo list = 1; }
  2885. message VpnipRangeExBatchAddResp { repeated VpnipRangeExVo list = 1; }
  2886. message VpnipRangeExBatchUpdateReq { repeated VpnipRangeExVo list = 1; }
  2887. message VpnipRangeExBatchUpdateResp { repeated VpnipRangeExVo list = 1; }
  2888. // VpnipBindVo
  2889. message VpnipBindVo {
  2890. int64 id = 1; // ID
  2891. int64 ipId = 2; // IP ID
  2892. int64 serverId = 3; // 服务器ID
  2893. string batchId = 4; // 批次ID,用于批量操作和回滚
  2894. string prevBindId = 5; // 上一次绑定记录的ID,为空时表示之前未绑定
  2895. int64 bindTime = 6; // 绑定时间
  2896. int64 unbindTime = 7; // 解绑时间
  2897. int64 isCurrent = 8; // 是否为当前绑定记录
  2898. string remark = 9; // 备注
  2899. int64 createTime = 10; // 创建时间
  2900. int64 createAt = 11; // 创建者ID
  2901. int64 updateTime = 12; // 更新时间
  2902. int64 updateAt = 13; // 更新者ID
  2903. }
  2904. message VpnipBindAddReq { VpnipBindVo vo = 1; }
  2905. message VpnipBindAddResp { VpnipBindVo vo = 1; }
  2906. message VpnipBindUpdateReq { VpnipBindVo vo = 1; }
  2907. message VpnipBindUpdateResp { VpnipBindVo vo = 1; }
  2908. message VpnipBindGetReq { VpnipBindVo vo = 1; }
  2909. message VpnipBindGetResp { VpnipBindVo vo = 1; }
  2910. message VpnipBindListReq {
  2911. Page page = 1;
  2912. VpnipBindVo vo = 2;
  2913. repeated int64 excludeIds = 3;
  2914. repeated int64 ipIds = 4;
  2915. repeated int64 serverIds = 5;
  2916. repeated string ips = 6;
  2917. repeated int64 instanceIds = 7;
  2918. }
  2919. message VpnipBindListResp {
  2920. int64 total = 1;
  2921. repeated VpnipBindVo list = 2;
  2922. }
  2923. message VpnipBindBatchAddReq { repeated VpnipBindVo list = 1; }
  2924. message VpnipBindBatchAddResp { repeated VpnipBindVo list = 1; }
  2925. message VpnipBindBatchUpdateReq { repeated VpnipBindVo list = 1; }
  2926. message VpnipBindBatchUpdateResp { repeated VpnipBindVo list = 1; }
  2927. // VpnConfigTemplatePlanVo
  2928. message VpnConfigTemplatePlanVo {
  2929. int64 id = 1; // id
  2930. string productCode = 2; // 产品Code
  2931. string name = 3; // 配置名称
  2932. string config = 4; // 保留字段,用于扩展配置
  2933. int64 sort = 5; // 排序
  2934. Status status = 6; // 状态
  2935. string remark = 7; // 备注
  2936. int64 createTime = 8; // 创建时间
  2937. int64 createAt = 9; // 创建者Id
  2938. int64 updateTime = 10; // 更新时间
  2939. int64 updateAt = 11; // 更新者Id
  2940. string version = 12; // 数据版本
  2941. }
  2942. // VpnConfigTemplatePlanDetailVo
  2943. message VpnConfigTemplatePlanDetailVo {
  2944. int64 id = 1; // id
  2945. int64 planId = 2; // 配置模板主表id
  2946. string core = 3; // 内核
  2947. string name = 4; // 名称
  2948. string serverConfig = 5; // 服务端配置
  2949. string clientConfig = 6; // 客户端配置
  2950. string policyConfig = 7; // 策略配置
  2951. int64 sort = 8; // 排序
  2952. Status status = 9; // 状态
  2953. string remark = 10; // 备注
  2954. int64 createTime = 11; // 创建时间
  2955. int64 createAt = 12; // 创建者Id
  2956. int64 updateTime = 13; // 更新时间
  2957. int64 updateAt = 14; // 更新者Id
  2958. string version = 15; // 数据版本
  2959. }
  2960. message VpnConfigTemplatePlanAddReq {
  2961. VpnConfigTemplatePlanVo plan = 1;
  2962. repeated VpnConfigTemplatePlanDetailVo details = 2;
  2963. }
  2964. message VpnConfigTemplatePlanAddResp {
  2965. VpnConfigTemplatePlanVo plan = 1;
  2966. repeated VpnConfigTemplatePlanDetailVo details = 2;
  2967. }
  2968. message VpnConfigTemplatePlanUpdateReq {
  2969. VpnConfigTemplatePlanVo vo = 1;
  2970. bool withDetails = 2;
  2971. }
  2972. message VpnConfigTemplatePlanUpdateResp {
  2973. VpnConfigTemplatePlanVo plan = 1;
  2974. repeated VpnConfigTemplatePlanDetailVo details = 2;
  2975. }
  2976. message VpnConfigTemplatePlanDelReq { repeated int64 ids = 1; }
  2977. message VpnConfigTemplatePlanGetReq {
  2978. VpnConfigTemplatePlanVo vo = 1;
  2979. bool withDetails = 2;
  2980. }
  2981. message VpnConfigTemplatePlanGetResp {
  2982. VpnConfigTemplatePlanVo plan = 1;
  2983. repeated VpnConfigTemplatePlanDetailVo details = 2;
  2984. }
  2985. message VpnConfigTemplatePlanListReq {
  2986. Page page = 1;
  2987. VpnConfigTemplatePlanVo vo = 2;
  2988. repeated int64 excludeIds = 3;
  2989. repeated string productCodes = 4;
  2990. bool withDetails = 5;
  2991. }
  2992. message VpnConfigTemplatePlanListResp {
  2993. int64 total = 1;
  2994. repeated VpnConfigTemplatePlanGetResp list = 2;
  2995. }
  2996. message VpnConfigTemplatePlanDetailAddReq {
  2997. VpnConfigTemplatePlanDetailVo vo = 1;
  2998. }
  2999. message VpnConfigTemplatePlanDetailAddResp {
  3000. VpnConfigTemplatePlanDetailVo vo = 1;
  3001. }
  3002. message VpnConfigTemplatePlanDetailUpdateReq {
  3003. VpnConfigTemplatePlanDetailVo vo = 1;
  3004. }
  3005. message VpnConfigTemplatePlanDetailUpdateResp {
  3006. VpnConfigTemplatePlanDetailVo vo = 1;
  3007. }
  3008. message VpnConfigTemplatePlanDetailDelReq { repeated int64 ids = 1; }
  3009. message VpnConfigTemplatePlanDetailGetReq {
  3010. VpnConfigTemplatePlanDetailVo vo = 1;
  3011. }
  3012. message VpnConfigTemplatePlanDetailGetResp {
  3013. VpnConfigTemplatePlanDetailVo vo = 1;
  3014. }
  3015. message VpnConfigTemplatePlanDetailListReq {
  3016. Page page = 1;
  3017. VpnConfigTemplatePlanDetailVo vo = 2;
  3018. repeated int64 planIds = 3;
  3019. repeated int64 excludeIds = 4;
  3020. repeated string productCodes = 5;
  3021. }
  3022. message VpnConfigTemplatePlanDetailListResp {
  3023. int64 total = 1;
  3024. repeated VpnConfigTemplatePlanDetailVo list = 2;
  3025. }
  3026. // govpn 模块,VPN相关服务
  3027. service GoVpnClient {
  3028. rpc Ping(Request) returns (Response);
  3029. // 表的事务操作
  3030. rpc Transaction(TransactionReq) returns (Empty);
  3031. /** VpnTag Model */
  3032. // VpnTagAdd
  3033. rpc VpnTagAdd(VpnTagVo) returns (VpnTagVo);
  3034. rpc VpnTagUpdate(VpnTagVo) returns (VpnTagVo);
  3035. rpc VpnTagDel(Ids) returns (Empty);
  3036. rpc VpnTagGet(VpnTagGetReq) returns (VpnTagVo);
  3037. rpc VpnTagList(VpnTagListReq) returns (VpnTagListResp);
  3038. rpc VpnTagBatchAdd(VpnTagBatchAddReq) returns (VpnTagBatchAddResp);
  3039. rpc VpnTagBatchUpdate(VpnTagBatchUpdateReq) returns (VpnTagBatchUpdateResp);
  3040. /** VpnGroup Model */
  3041. // VpnGroupAdd
  3042. rpc VpnGroupAdd(VpnGroupAddReq) returns (VpnGroupVo);
  3043. rpc VpnGroupUpdate(VpnGroupAddReq) returns (Empty);
  3044. rpc VpnGroupDel(Ids) returns (Empty);
  3045. rpc VpnGroupGet(VpnGroupGetReq) returns (VpnGroupVo);
  3046. rpc VpnGroupList(VpnGroupListReq) returns (VpnGroupListResp);
  3047. rpc VpnGroupBatchAdd(VpnGroupBatchAddReq) returns (VpnGroupBatchAddResp);
  3048. rpc VpnGroupBatchUpdate(VpnGroupBatchUpdateReq) returns (VpnGroupBatchUpdateResp);
  3049. /** VpnGroupTag Model */
  3050. // VpnGroupTagAdd
  3051. rpc VpnGroupTagAdd(VpnGroupTagVo) returns (VpnGroupTagVo);
  3052. rpc VpnGroupTagUpdate(VpnGroupTagVo) returns (VpnGroupTagVo);
  3053. rpc VpnGroupTagDel(Ids) returns (Empty);
  3054. rpc VpnGroupTagGet(VpnGroupTagVo) returns (VpnGroupTagVo);
  3055. rpc VpnGroupTagList(VpnGroupTagListReq) returns (VpnGroupTagListResp);
  3056. /** VpnLocation Model */
  3057. // VpnLocationAdd
  3058. rpc VpnLocationAdd(VpnLocationVo) returns (VpnLocationVo);
  3059. rpc VpnLocationUpdate(VpnLocationVo) returns (Empty);
  3060. rpc VpnLocationDel(Ids) returns (Empty);
  3061. rpc VpnLocationGet(VpnLocationGetReq) returns (VpnLocationVo);
  3062. rpc VpnLocationList(VpnLocationListReq) returns (VpnLocationListResp);
  3063. rpc VpnLocationBatchAdd(VpnLocationBatchAddReq) returns (VpnLocationBatchAddResp);
  3064. rpc VpnLocationBatchUpdate(VpnLocationBatchUpdateReq) returns (VpnLocationBatchUpdateResp);
  3065. /** VpnServer Model */
  3066. // VpnServerAdd
  3067. rpc VpnServerAdd(VpnServerAddReq) returns (VpnServerAddReq);
  3068. rpc VpnServerUpdate(VpnServerAddReq) returns (VpnServerAddReq);
  3069. rpc VpnServerDel(Ids) returns (Empty);
  3070. rpc VpnServerGet(VpnServerVo) returns (VpnServerVo);
  3071. rpc VpnServerExGet(VpnServerVo) returns (VpnServerExVo);
  3072. rpc VpnServerList(VpnServerListReq) returns (VpnServerListResp);
  3073. rpc VpnServerExList(VpnServerListReq) returns (VpnServerExListResp);
  3074. rpc VpnServerBatchAdd(VpnServerBatchAddReq) returns (VpnServerBatchAddResp);
  3075. rpc VpnServerBatchUpdate(VpnServerBatchUpdateReq) returns (VpnServerBatchUpdateResp);
  3076. /** VpnServerLocation Model */
  3077. // VpnServerLocationAdd
  3078. rpc VpnServerLocationAdd(VpnServerLocationVo) returns (VpnServerLocationVo);
  3079. rpc VpnServerLocationUpdate(VpnServerLocationVo) returns (Empty);
  3080. rpc VpnServerLocationDel(Ids) returns (Empty);
  3081. rpc VpnServerLocationGet(VpnServerLocationVo) returns (VpnServerLocationVo);
  3082. rpc VpnServerLocationList(VpnServerLocationListReq) returns (VpnServerLocationListResp);
  3083. rpc VpnWithIPAndPort(VpnWithIPAndPortReq) returns (VpnWithIPAndPortResp);
  3084. // VpnLocationServerCount
  3085. rpc VpnLocationServerCount(VpnLocationServerCountReq) returns (VpnLocationServerCountResp);
  3086. /** VpnProbeTask Model */
  3087. // VpnProbeTaskAdd
  3088. rpc VpnProbeTaskAdd(VpnProbeTaskVo) returns (VpnProbeTaskVo);
  3089. rpc VpnProbeTaskUpdate(VpnProbeTaskVo) returns (Empty);
  3090. rpc VpnProbeTaskList(VpnProbeTaskListReq) returns (VpnProbeTaskListResp);
  3091. /** VpnipWalled Model */
  3092. // VpnipWalledAdd
  3093. rpc VpnipWalledAdd(VpnipWalledAddReq) returns (VpnipWalledAddResp);
  3094. rpc VpnipWalledUpdate(VpnipWalledUpdateReq) returns (VpnipWalledUpdateResp);
  3095. rpc VpnipWalledDel(Ids) returns (Empty);
  3096. rpc VpnipWalledGet(VpnipWalledGetReq) returns (VpnipWalledGetResp);
  3097. rpc VpnipWalledList(VpnipWalledListReq) returns (VpnipWalledListResp);
  3098. rpc VpnipWalledBatchAdd(VpnipWalledBatchAddReq) returns (VpnipWalledBatchAddResp);
  3099. rpc VpnipWalledBatchUpdate(VpnipWalledBatchUpdateReq) returns (VpnipWalledBatchUpdateResp);
  3100. /** Vpnip Model */
  3101. // VpnipAdd
  3102. rpc VpnipAdd(VpnipAddReq) returns (VpnipAddResp);
  3103. rpc VpnipExAdd(VpnipExAddReq) returns (VpnipExAddResp);
  3104. rpc VpnipUpdate(VpnipUpdateReq) returns (VpnipUpdateResp);
  3105. rpc VpnipExUpdate(VpnipExUpdateReq) returns (VpnipExUpdateResp);
  3106. rpc VpnipDel(Ids) returns (Empty);
  3107. rpc VpnipGet(VpnipGetReq) returns (VpnipGetResp);
  3108. rpc VpnipExGet(VpnipGetReq) returns (VpnipExGetResp);
  3109. rpc VpnipList(VpnipListReq) returns (VpnipListResp);
  3110. rpc VpnipExList(VpnipListReq) returns (VpnipExListResp);
  3111. rpc VpnipBatchAdd(VpnipBatchAddReq) returns (VpnipBatchAddResp);
  3112. rpc VpnipBatchUpdate(VpnipBatchUpdateReq) returns (VpnipBatchUpdateResp);
  3113. rpc VpnipExBatchAdd(VpnipExBatchAddReq) returns (VpnipExBatchAddResp);
  3114. rpc VpnipExBatchUpdate(VpnipExBatchUpdateReq) returns (VpnipExBatchUpdateResp);
  3115. /** VpnipRange Model */
  3116. // VpnipRangeAdd
  3117. rpc VpnipRangeAdd(VpnipRangeAddReq) returns (VpnipRangeAddResp);
  3118. // VpnipRangeExAdd 添加IP段及IP数据,如果IP数据已存在,会自动将已经存在的IP的 rangeId 更新为新增的IP段的ID
  3119. rpc VpnipRangeExAdd(VpnipRangeExAddReq) returns (VpnipRangeExAddResp);
  3120. rpc VpnipRangeUpdate(VpnipRangeUpdateReq) returns (VpnipRangeUpdateResp);
  3121. rpc VpnipRangeExUpdate(VpnipRangeExUpdateReq) returns (VpnipRangeExUpdateResp);
  3122. rpc VpnipRangeDel(Ids) returns (Empty);
  3123. rpc VpnipRangeGet(VpnipRangeGetReq) returns (VpnipRangeGetResp);
  3124. rpc VpnipRangeExGet(VpnipRangeGetReq) returns (VpnipRangeExGetResp);
  3125. rpc VpnipRangeList(VpnipRangeListReq) returns (VpnipRangeListResp);
  3126. rpc VpnipRangeExList(VpnipRangeListReq) returns (VpnipRangeExListResp);
  3127. rpc VpnipRangeBatchAdd(VpnipRangeBatchAddReq) returns (VpnipRangeBatchAddResp);
  3128. rpc VpnipRangeExBatchAdd(VpnipRangeExBatchAddReq) returns (VpnipRangeExBatchAddResp);
  3129. rpc VpnipRangeBatchUpdate(VpnipRangeBatchUpdateReq) returns (VpnipRangeBatchUpdateResp);
  3130. rpc VpnipRangeExBatchUpdate(VpnipRangeExBatchUpdateReq) returns (VpnipRangeExBatchUpdateResp);
  3131. /** VpnipBind Model */
  3132. // VpnipBindAdd
  3133. rpc VpnipBindAdd(VpnipBindAddReq) returns (VpnipBindAddResp);
  3134. rpc VpnipBindUpdate(VpnipBindUpdateReq) returns (VpnipBindUpdateResp);
  3135. rpc VpnipBindDel(Ids) returns (Empty);
  3136. rpc VpnipBindGet(VpnipBindGetReq) returns (VpnipBindGetResp);
  3137. rpc VpnipBindList(VpnipBindListReq) returns (VpnipBindListResp);
  3138. rpc VpnipBindBatchUpdate(VpnipBindBatchUpdateReq) returns (VpnipBindBatchUpdateResp);
  3139. // VpnipsBindServer 为一台服务器绑定一批新IP,会解绑上次绑定的IP,再绑定新的IP,仅需提供 ipId, serverId, Remark, createAt, updateAt 即可,其他字段会自动填充
  3140. rpc VpnipsBindServer(VpnipBindBatchAddReq) returns (VpnipBindBatchAddResp);
  3141. /** VpnConfigTemplatePlan Model (Xray配置模板,jump那边叫做配置模板)*/
  3142. // VpnConfigTemplatePlanAdd 添加配置模板及模板详情
  3143. rpc VpnConfigTemplatePlanAdd(VpnConfigTemplatePlanAddReq) returns (VpnConfigTemplatePlanAddResp);
  3144. // VpnConfigTemplatePlanUpdate 更新配置模板(只更新模板,不更新模板详情,如果 withDetails 为 true,则返回结果中包含模板详情)
  3145. rpc VpnConfigTemplatePlanUpdate(VpnConfigTemplatePlanUpdateReq) returns (VpnConfigTemplatePlanUpdateResp);
  3146. // VpnConfigTemplatePlanDel 删除配置模板(会同时删除模板详情)
  3147. rpc VpnConfigTemplatePlanDel(VpnConfigTemplatePlanDelReq) returns (Empty);
  3148. // VpnConfigTemplatePlanGet 获取配置模板(如果 withDetails 为 true,则返回结果中包含模板详情)
  3149. rpc VpnConfigTemplatePlanGet(VpnConfigTemplatePlanGetReq) returns (VpnConfigTemplatePlanGetResp);
  3150. // VpnConfigTemplatePlanList 获取配置模板列表(如果 withDetails 为 true,则返回结果中包含模板详情)
  3151. rpc VpnConfigTemplatePlanList(VpnConfigTemplatePlanListReq) returns (VpnConfigTemplatePlanListResp);
  3152. /** VpnConfigTemplatePlanDetail Model (Xray配置模板详情,jump那边叫做传输配置)*/
  3153. // VpnConfigTemplatePlanDetailAdd 添加模板详情
  3154. rpc VpnConfigTemplatePlanDetailAdd(VpnConfigTemplatePlanDetailAddReq) returns (VpnConfigTemplatePlanDetailAddResp);
  3155. rpc VpnConfigTemplatePlanDetailUpdate(VpnConfigTemplatePlanDetailUpdateReq) returns (VpnConfigTemplatePlanDetailUpdateResp);
  3156. rpc VpnConfigTemplatePlanDetailDel(VpnConfigTemplatePlanDetailDelReq) returns (Empty);
  3157. rpc VpnConfigTemplatePlanDetailGet(VpnConfigTemplatePlanDetailGetReq) returns (VpnConfigTemplatePlanDetailGetResp);
  3158. rpc VpnConfigTemplatePlanDetailList(VpnConfigTemplatePlanDetailListReq) returns (VpnConfigTemplatePlanDetailListResp);
  3159. }