gorpc.proto 111 KB

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