gorpc.proto 111 KB

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