gorpc.proto 105 KB

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