ticket.proto 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. //存放api使用的模型
  2. syntax = "proto3";
  3. package ticket.service.sales.v1;
  4. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  5. option go_package = "v1";
  6. option (gogoproto.goproto_getters_all) = false;
  7. option (gogoproto.goproto_stringer_all) = false;
  8. option (gogoproto.stringer_all) = true;
  9. service Ticket {
  10. // 查询电子票详情 - 支持根据订单号查询、场次 + uid 查询、票 id 查询
  11. rpc TicketView(TicketViewRequest) returns (TicketViewResponse);
  12. // 查询赠票信息
  13. rpc TicketSend(TicketSendRequest) returns (TicketSendResponse);
  14. }
  15. message TicketViewRequest {
  16. int64 order_id = 1 [(gogoproto.customname) = "OrderID"];
  17. int64 uid = 2 [(gogoproto.customname) = "UID"];
  18. int64 screen_id = 3 [(gogoproto.customname) = "ScreenID"];
  19. repeated int64 id = 4 [(gogoproto.customname) = "ID"];
  20. }
  21. message TicketViewResponse {
  22. repeated TicketItem tickets = 1;
  23. }
  24. message TicketItem {
  25. int64 id = 1 [(gogoproto.customname) = "ID"];
  26. int64 uid = 2 [(gogoproto.customname) = "UID"];
  27. int64 oid = 3 [(gogoproto.customname) = "OID"];
  28. int64 sid = 4 [(gogoproto.customname) = "SID"];
  29. int64 price = 5;
  30. int64 src = 6 [(gogoproto.casttype) = "int16"];
  31. int64 type = 7 [(gogoproto.casttype) = "int16"];
  32. int64 status = 8 [(gogoproto.casttype) = "int16"];
  33. string qr = 9;
  34. int64 ref_id = 10 [(gogoproto.customname) = "RefID"];
  35. int64 sku_id = 11 [(gogoproto.customname) = "SkuID"];
  36. int64 seat_id = 12 [(gogoproto.customname) = "SeatID"];
  37. string seat = 13;
  38. int64 refund_apply_time = 14 [(gogoproto.casttype) = "go-common/library/time.Time"];
  39. int64 etime = 15 [(gogoproto.customname) = "ETime", (gogoproto.casttype) = "go-common/library/time.Time"];
  40. int64 ctime = 16 [(gogoproto.customname) = "CTime", (gogoproto.casttype) = "go-common/library/time.Time"];
  41. int64 mtime = 17 [(gogoproto.customname) = "MTime", (gogoproto.casttype) = "go-common/library/time.Time"];
  42. }
  43. message TicketSendRequest {
  44. repeated int64 send_tid = 1 [(gogoproto.customname) = "SendTID"];
  45. repeated int64 recv_tid = 2 [(gogoproto.customname) = "RecvTID"];
  46. }
  47. message TicketSendResponse {
  48. repeated TicketSendItem ticket_sends = 1;
  49. }
  50. message TicketSendItem {
  51. int64 id = 1 [(gogoproto.customname) = "ID"];
  52. int64 sid = 2 [(gogoproto.customname) = "SID"];
  53. int64 send_tid = 3 [(gogoproto.customname) = "SendTID"];
  54. int64 recv_tid = 4 [(gogoproto.customname) = "RecvTID"];
  55. int64 send_uid = 5 [(gogoproto.customname) = "SendUID"];
  56. int64 recv_uid = 6 [(gogoproto.customname) = "RecvUID"];
  57. string recv_tel = 7 [(gogoproto.customname) = "RecvTel"];
  58. int32 status = 8 [(gogoproto.casttype) = "int16"];
  59. int64 ctime = 9 [(gogoproto.customname) = "CTime", (gogoproto.casttype) = "go-common/library/time.Time"];
  60. int64 mtime = 10 [(gogoproto.customname) = "MTime", (gogoproto.casttype) = "go-common/library/time.Time"];
  61. int64 oid = 11 [(gogoproto.customname) = "OID"];
  62. }