gorpc.proto 112 KB

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