place.proto 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. syntax = "proto3";
  2. package ticket.service.item.v1;
  3. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  4. option (gogoproto.goproto_enum_prefix_all) = false;
  5. option (gogoproto.goproto_getters_all) = false;
  6. option (gogoproto.unmarshaler_all) = true;
  7. option (gogoproto.marshaler_all) = true;
  8. option (gogoproto.sizer_all) = true;
  9. option go_package = "v1";
  10. // The place service definition.
  11. service Place {
  12. rpc PlaceInfo (PlaceInfoRequest) returns (PlaceInfoReply) {}
  13. }
  14. // The response message containing the Place info
  15. message PlaceInfo {
  16. // 状态
  17. int64 id = 1 [(gogoproto.jsontag) = "id",(gogoproto.customname)= "ID"];
  18. // 场地名
  19. int32 status = 2 [(gogoproto.jsontag) = "status"];
  20. // 场地底图
  21. string name = 3 [(gogoproto.jsontag) = "name"];
  22. // 场馆ID
  23. string base_pic = 4 [(gogoproto.jsontag) = "base_pic"];
  24. // mis画框宽度
  25. int32 d_width = 5 [(gogoproto.jsontag) = "d_width"];
  26. // mis画框高度
  27. int32 d_height = 6 [(gogoproto.jsontag) = "d_height"];
  28. }
  29. // placeInfo接口请求
  30. message PlaceInfoRequest {
  31. // 待修改场地的ID(为0表示创建)
  32. int64 ID = 1 [(gogoproto.jsontag) = "id", (gogoproto.moretags) = "validate:\"min=0\""];
  33. // 状态
  34. int32 Status = 2 [(gogoproto.jsontag) = "status", (gogoproto.moretags) = "validate:\"min=0,max=1\""];
  35. // 场地名
  36. string Name = 3 [(gogoproto.jsontag) = "name", (gogoproto.moretags) = "validate:\"max=16\""];
  37. // 场地底图
  38. string BasePic = 4 [(gogoproto.jsontag) = "base_pic", (gogoproto.moretags) = "validate:\"max=128\""];
  39. // 场馆ID
  40. int64 Venue = 5 [(gogoproto.jsontag) = "venue", (gogoproto.moretags) = "validate:\"min=1\""];
  41. // mis画框宽度
  42. int32 DWidth = 6 [(gogoproto.jsontag) = "d_width", (gogoproto.moretags) = "validate:\"min=0\""];
  43. // mis画框高度
  44. int32 DHeight = 7 [(gogoproto.jsontag) = "d_height", (gogoproto.moretags) = "validate:\"min=0\""];
  45. }
  46. // placeInfo接口返回
  47. message PlaceInfoReply {
  48. // 操作结果
  49. bool Success = 1 [(gogoproto.jsontag) = "success"];
  50. // 操作场地ID
  51. int64 ID = 2 [(gogoproto.jsontag) = "id"];
  52. }