gorpc.proto 111 KB

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