common.proto 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. syntax = "proto3";
  2. package common;
  3. option go_package = "./common";
  4. //
  5. message ProjectReq {
  6. string appId = 1;//剑鱼标识 默认10000
  7. }
  8. //地区信息
  9. message AreaResp {
  10. int64 err_code = 1;
  11. string err_msg = 2;
  12. repeated Province data = 3;//城市信息
  13. }
  14. //
  15. message Province{
  16. string code = 1;//省份编码
  17. string name = 2;//省份名称
  18. repeated City citys = 3;//城市信息
  19. }
  20. //
  21. message City{
  22. string code = 1;//城市编码
  23. string name = 2;//城市名称
  24. }
  25. //行业信息
  26. message IndustryResp{
  27. int64 err_code = 1;
  28. string err_msg = 2;
  29. Idata data = 3;
  30. }
  31. message Idata {
  32. repeated Infotype infotype = 1;//信息类型
  33. repeated Supply buyerclass = 2;//采购单位类型
  34. repeated Industry industry = 3;//行业
  35. }
  36. message Supply{
  37. string name = 1;
  38. }
  39. message Industry{
  40. string name = 1;
  41. }
  42. //
  43. message Infotype{
  44. int64 id = 1;
  45. string name = 2;
  46. repeated IndustryChildsResp childs = 3;
  47. }
  48. //二级行业
  49. message IndustryChildsResp{
  50. string name = 1;
  51. string code = 2;
  52. }
  53. message StateRequest {
  54. string Id = 1;//mysql 信息id
  55. string publishId = 2;//mongodb bidding信息id
  56. // repeated Request message = 1;
  57. }
  58. message StateResponse {
  59. int64 err_code = 1;
  60. string err_msg = 2;
  61. }
  62. message SensitiveRequest {
  63. string Id = 1;//信息id
  64. string MsgType = 2;//信息类型:1:招标信息;2:采购信息;3:供应信息
  65. repeated string Title = 3;//标题
  66. repeated string Detail = 4;//详情
  67. string Attachments = 5;//附件
  68. string AttachTxt = 6;//附件备注
  69. }
  70. message SensitiveResponse {
  71. int64 err_code = 1;
  72. string err_msg = 2;
  73. }
  74. //
  75. service commonInfo {
  76. //获取省份信息
  77. rpc AreaInfo(ProjectReq) returns(AreaResp);
  78. //获取行业信息
  79. rpc IndustryInfo(ProjectReq) returns(IndustryResp);
  80. //修改信息发布状态
  81. rpc StateMethod(StateRequest) returns (StateResponse);
  82. //
  83. rpc SensitiveMethod(SensitiveRequest) returns (SensitiveResponse);
  84. }