gorpc.proto 111 KB

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