gorpc.proto 111 KB

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