gorpc.proto 111 KB

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