From 1c4d2f3b608e303782d7aec1810082b1ec26764a Mon Sep 17 00:00:00 2001 From: TremblingV5 Date: Sat, 16 Nov 2024 15:36:18 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BA=A4=E6=98=93=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=8E=A5=E5=8F=A3=E8=AE=BE=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/baseService/api/pay.proto | 20 ++ backend/baseService/api/promotion.proto | 47 ++++ backend/baseService/api/refund.proto | 38 +++ backend/baseService/api/trade.proto | 92 +++++++ backend/baseService/api/trade_entities.proto | 231 ++++++++++++++++++ .../docs/apis/baseservice/TradeService.md | 38 +++ 6 files changed, 466 insertions(+) create mode 100644 backend/baseService/api/pay.proto create mode 100644 backend/baseService/api/promotion.proto create mode 100644 backend/baseService/api/refund.proto create mode 100644 backend/baseService/api/trade.proto create mode 100644 backend/baseService/api/trade_entities.proto create mode 100644 docs-site/docs/apis/baseservice/TradeService.md diff --git a/backend/baseService/api/pay.proto b/backend/baseService/api/pay.proto new file mode 100644 index 0000000..47a8835 --- /dev/null +++ b/backend/baseService/api/pay.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; +package api; + +option go_package = "github.com/cloudzenith/DouTok/...;api"; + +import "base.proto"; +import "trade_entities.proto"; +import "buf/validate/validate.proto"; + +service PayService { + rpc Pay(PayRequest) returns (PayResponse); // 支付 +} + +message PayRequest { + +} + +message PayResponse { + +} diff --git a/backend/baseService/api/promotion.proto b/backend/baseService/api/promotion.proto new file mode 100644 index 0000000..26552a6 --- /dev/null +++ b/backend/baseService/api/promotion.proto @@ -0,0 +1,47 @@ +syntax = "proto3"; +package api; + +option go_package = "github.com/cloudzenith/DouTok/...;api"; + +import "base.proto"; +import "trade_entities.proto"; +import "buf/validate/validate.proto"; + +service PromotionService { + rpc PromotionCreate(PromotionCreateRequest) returns (PromotionCreateResponse); // 创建促销信息 + rpc PromotionQuery(PromotionQueryRequest) returns (PromotionQueryResponse); // 查询促销信息 + rpc PromotionUpdate(PromotionUpdateRequest) returns (PromotionUpdateResponse); // 更新促销信息 + rpc PromotionDelete(PromotionDeleteRequest) returns (PromotionDeleteResponse); // 删除促销信息 +} + +message PromotionCreateRequest { + +} + +message PromotionCreateResponse { + +} + +message PromotionQueryRequest { + +} + +message PromotionQueryResponse { + +} + +message PromotionUpdateRequest { + +} + +message PromotionUpdateResponse { + +} + +message PromotionDeleteRequest { + +} + +message PromotionDeleteResponse { + +} diff --git a/backend/baseService/api/refund.proto b/backend/baseService/api/refund.proto new file mode 100644 index 0000000..a559690 --- /dev/null +++ b/backend/baseService/api/refund.proto @@ -0,0 +1,38 @@ +syntax = "proto3"; +package api; + +option go_package = "github.com/cloudzenith/DouTok/...;api"; + +import "base.proto"; +import "trade_entities.proto"; +import "buf/validate/validate.proto"; + +service RefundService { + rpc RefundCreate(RefundCreateRequest) returns (RefundCreateResponse); // 创建退款单 + rpc RefundQuery(RefundQueryRequest) returns (RefundQueryResponse); // 查询退款单 + rpc RefundUpdate(RefundUpdateRequest) returns (RefundUpdateResponse); // 更新退款单 +} + +message RefundCreateRequest { + +} + +message RefundCreateResponse { + +} + +message RefundQueryRequest { + +} + +message RefundQueryResponse { + +} + +message RefundUpdateRequest { + +} + +message RefundUpdateResponse { + +} \ No newline at end of file diff --git a/backend/baseService/api/trade.proto b/backend/baseService/api/trade.proto new file mode 100644 index 0000000..8d94805 --- /dev/null +++ b/backend/baseService/api/trade.proto @@ -0,0 +1,92 @@ +syntax = "proto3"; +package api; + +option go_package = "github.com/cloudzenith/DouTok/...;api"; + +import "base.proto"; +import "trade_entities.proto"; +import "buf/validate/validate.proto"; + +service TradeService { + rpc QueryTradeOrder(QueryTradeOrderRequest) returns (QueryTradeOrderResponse); // 查询交易单 + rpc TradeCreate(TradeCreateRequest) returns (TradeCreateResponse); // 创建交易单 + rpc MergeTrade(MergeTradeRequest) returns (MergeTradeResponse); // 合并交易单 + rpc MultiTradeCreate(MultiTradeCreateRequest) returns (MultiTradeCreateResponse); // 批量创建交易单 + rpc UpdateExtendInfo(UpdateExtendInfoRequest) returns (UpdateExtendInfoResponse); // 更新交易单扩展信息 + rpc UpdateTradeOrderStatus(UpdateTradeOrderStatusRequest) returns (UpdateTradeOrderStatusResponse); // 更新交易单状态 + rpc ModifyOrderPrice(ModifyOrderPriceRequest) returns (ModifyOrderPriceResponse); // 修改订单价格 + rpc UpdateDeliveryInfo(UpdateDeliveryInfoRequest) returns (UpdateDeliveryInfoResponse); // 更新交付信息 + rpc AddSubOrder(AddSubOrderRequest) returns (AddSubOrderResponse); // 添加子订单 +} + +message QueryTradeOrderRequest { + +} + +message QueryTradeOrderResponse { + +} + +message TradeCreateRequest { + +} + +message TradeCreateResponse { + +} + +message MergeTradeRequest { + +} + +message MergeTradeResponse { + +} + +message MultiTradeCreateRequest { + +} + +message MultiTradeCreateResponse { + +} + +message UpdateExtendInfoRequest { + +} + +message UpdateExtendInfoResponse { + +} + +message UpdateTradeOrderStatusRequest { + +} + +message UpdateTradeOrderStatusResponse { + +} + +message ModifyOrderPriceRequest { + +} + +message ModifyOrderPriceResponse { + +} + +message UpdateDeliveryInfoRequest { + +} + +message UpdateDeliveryInfoResponse { + +} + +message AddSubOrderRequest { + +} + +message AddSubOrderResponse { + +} diff --git a/backend/baseService/api/trade_entities.proto b/backend/baseService/api/trade_entities.proto new file mode 100644 index 0000000..e3b1dda --- /dev/null +++ b/backend/baseService/api/trade_entities.proto @@ -0,0 +1,231 @@ +syntax = "proto3"; +package api; + +option go_package = "github.com/cloudzenith/DouTok/...;api"; + +import "buf/validate/validate.proto"; + +// 交易单交易类型枚举 表明该笔交易完成了一个怎样的操作 +enum TradeBizType { + DEFAULT_BT = 0; // 默认值 + RECHARGE_BT = 1; // DouTok币充值 + MALL_ORDERS_BT = 2; // 商城订单 +} + +// 销售方式 +enum TradeSaleWay { + DEFAULT_SW = 0; // 默认值 + DIRECT_SW = 1; // 直接销售 + ADAPTED_SW = 2; // 代理销售 +} + +// 支付顺序 +enum TradePaySequence { + PAY_FIRST = 0; // 先支付 + PAY_LAST = 1; // 后支付 +} + +// 交易对象的商品类型 +enum TradeGoodsType { + DEFAULT_GT = 0; // 默认值 + NORMAL_GT = 1; // 普通商品 + VIRTUAL_GT = 2; // 虚拟商品 + COUPON_GT = 3; // 优惠券 +} + +enum TradeOrderStatusEnum { + CREATE = 0; // 已创建 + PAY = 1; // 已支付 + DELIVERY_STARTED = 2; // 开始交付 + DELIVERY_FINISHED = 3; // 交付完成 + CLOSED = 4; // 已关闭 + SUCCESS = 5; // 交易成功 + FAIL = 6; // 交易失败 + EVALUATED = 7; // 已完成交易评价 +} + +enum PayType { + INTERNAL = 0; // DouTok余额支付 + ALIPAY = 1; // 支付宝支付 +} + +// 交易参与人信息 +message TradeParticipant { + int64 account_id = 1; // 账户id +} + +enum TradePromotionType { + UNDEFINED_PT = 0; // 未定义 + COUPON_PT = 1; // 优惠券 +} + +message TradePromotion { + int64 promotion_id = 1; // 优惠id + string promotion_name = 2; // 优惠名称 + uint64 promotion_amount = 3; // 优惠金额 单位:分 +} + +enum DeliveryType { + UNDEFINED_DT = 0; // 未定义 + MERCHANT_DT = 1; // 商家发货 + PLATFORM_DT = 2; // 平台发货 + BUYER_DT = 3; // 买家自提 + NONE_DT = 4; // 无需发货 +} + +enum DeliveryCompany { + UNDEFINED_DC = 0; // 未定义 + SF_DC = 1; // 顺丰 + YTO_DC = 2; // 圆通 + ZTO_DC = 3; // 中通 + STO_DC = 4; // 申通 + YD_DC = 5; // 韵达 + EMS_DC = 6; // EMS + JD_DC = 7; // 京东 + OTHER_DC = 8; // 其他 +} + +message DeliveryInfo { + DeliveryType delivery_type = 1; // 发货类型 + DeliveryCompany delivery_company = 2; // 快递公司 + string delivery_no = 3; // 快递单号 + int64 id = 4; // 发货信息id + string receiver_name = 5; // 收货人姓名 + string receiver_mobile = 6; // 收货人手机号 + string receiver_address = 7; // 收货人地址 + map extra = 8; // 额外信息 +} + +message TimeoutInfo { + int64 expect_time_out = 1; // 预计超时时间 + int64 actual_time_out = 2; // 实际超时时间 + bool executed = 3; // 是否已执行超时后操作 +} + +enum CloseType { + UNDEFINED_CT = 0; // 默认值 + TIMEOUT_CT = 1; // 超时关闭 + BUYER_CT = 2; // 买家关闭 + SELLER_CT = 3; // 卖家关闭 +} + +enum PayScene { + NORMAL_PS = 0; // 正常支付 +} + +// 支付阶段 +enum PayPhase { + NONE_PP = 0; // 一口价 + INITIAL_PP = 1; // 初始化完成 + PAYING_PP = 2; // 支付中 + PAID_PP = 3; // 已支付 +} + +enum PayChannel { + UNDEFINED_PC = 0; // 未定义 + ALIPAY_PC = 1; // 支付宝 + WECHAT_PC = 2; // 微信 + UNION_PC = 3; // 银联 + APPLE_PC = 4; // 苹果支付 + GOOGLE_PC = 5; // Google支付 + DOUTOK_PC = 6; // Dou币支付 +} + +enum PayStatus { + INITIAL_PS = 0; // 未支付 + PAYING_PS = 1; // 支付中 + PAID_PS = 2; // 已支付 + CLOSED_PS = 3; // 已关闭 +} + +message PaymentInfo { + int64 id = 1; // 支付信息id + int64 order_id = 2; // 所属交易单id + string payment_no = 3; // 外部平台支付单号 + PayScene pay_scene = 4; // 支付场景 + uint64 paid_amount = 5; // 支付金额 单位:分 + PayPhase pay_phase = 6; // 支付阶段 + PayChannel pay_channel = 7; // 支付渠道 + PayStatus pay_status = 8; // 支付状态 + int64 create_time = 9; // 创建时间 + int64 pay_time = 10; // 支付时间 + int64 close_time = 11; // 关闭时间 + int64 success_time = 12; // 成功时间 + int64 update_time = 13; // 更新时间 +} + +enum TradeOrderRelation { + ORIGIN_TOR = 0; // 原始交易单 + RENEW_TOR = 1; // 续单 + TIED_TOR = 2; // 捆绑单 +} + +enum RefundOrderType { + UNDEFINED_ROT = 0; // 未定义 + BUYER_CANCEL_ROT = 1; // 买家退款 + SELLER_CANCEL_ROT = 2; // 卖家退款 +} + +enum RefundOrderStatus { + CREATE_ROS = 0; // 已创建 + REFUND_ROS = 1; // 已退款 + CLOSED_ROS = 2; // 已关闭 +} + +// 退款单 +message RefundOrder { + int64 refund_id = 1; // 退款单id + int64 order_id = 2; // 交易单id + int64 refund_amount = 3; // 退款金额 单位:分 + int64 refund_time = 4; // 退款时间 + int64 create_time = 5; // 创建时间 + int64 update_time = 6; // 更新时间 + int64 close_time = 7; // 关闭时间 + string refund_reason = 8; // 退款原因 + RefundOrderType refund_type = 9; // 退款类型 + RefundOrderStatus refund_status = 10; // 退款状态 +} + +// 交易单 +message TradeOrder { + int64 order_id = 1; // 交易单id + TradeBizType biz_type = 2; // 业务类型 + TradeSaleWay sale_way = 3; // 销售方式 + TradePaySequence pay_sequence = 4; // 支付顺序 + TradeGoodsType goods_type = 5; // 商品类型 + TradeOrderStatusEnum order_status = 6; // 交易单状态 + + int64 biz_status = 7; // 业务状态(具体业务自定义) + string biz_order_no = 8; // 业务订单号 + int64 biz_id = 9; // 业务id + + TradeParticipant buyer = 10; // 买家信息 + TradeParticipant seller = 11; // 卖家信息 + + PayType pay_type = 12; // 支付类型 + uint64 payable_amount = 13; // 应支付金额 单位:分 + uint64 paid_amount = 14; // 已支付金额 单位:分 + uint64 promotion_amount = 15; // 优惠金额 单位:分 + repeated TradePromotion promotions = 16; // 优惠信息 + DeliveryInfo delivery_info = 17; // 发货信息 + + int64 create_time = 18; // 创建时间 + int64 pay_time = 19; // 支付时间 + int64 delivery_time = 20; // 发货时间 + int64 close_time = 21; // 关闭时间 + + TimeoutInfo timeout_info = 22; // 超时信息 + + CloseType close_type = 23; // 关闭类型 + string close_reason = 24; // 关闭原因 + + repeated TradeOrder sub_order = 25; // 子订单 + repeated PaymentInfo payments = 26; // 支付信息 + + map extra = 27; // 额外信息 + + TradeOrderRelation trade_order_relation = 28; // 关系类型; 是sub order才有 + int64 origin_order_id = 29; // 原始交易单id; 是sub order才有 + + repeated RefundOrder refunds = 30; // 退款单 +} diff --git a/docs-site/docs/apis/baseservice/TradeService.md b/docs-site/docs/apis/baseservice/TradeService.md new file mode 100644 index 0000000..9a23652 --- /dev/null +++ b/docs-site/docs/apis/baseservice/TradeService.md @@ -0,0 +1,38 @@ +--- +sidebar_position: 2 +--- + +# 交易能力 + +```mermaid +sequenceDiagram + autonumber + + participant up as 上游服务 + participant ts as TradeService + participant pps as PayService + participant mq as 消息队列 + + up ->> up: 组装交易单所需的各类数据 + + up ->> ts: 创建交易单 + ts ->> pps: 创建支付单 + pps -->> ts: 返回支付单信息 + ts -->> up: 完成创建,返回交易单信息 + + up ->> ts: 更新交易单 + ts ->> pps: 更新支付单 + pps -->> ts: 返回支付单信息 + ts -->> up: 完成更新,返回交易单信息 + + up ->> ts: 查询交易单 + ts -->> up: 返回交易单信息 + + up ->> pps: 支付 + pps ->> mq: 发送支付消息 + pps -->> up: 返回支付结果 + + mq -->> up: 监听指定场景的支付结果 + + up ->> up: 完成交易后续流程 +``` From 71f9c89844f334a982047f22b1021e0027f8130f Mon Sep 17 00:00:00 2001 From: TremblingV5 Date: Sat, 16 Nov 2024 21:17:21 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/baseService/api/inventory.pb.go | 1254 ++++++++++ backend/baseService/api/inventory.proto | 104 + backend/baseService/api/inventory_grpc.pb.go | 211 ++ backend/baseService/api/pay.pb.go | 197 ++ backend/baseService/api/pay_grpc.pb.go | 103 + backend/baseService/api/promotion.pb.go | 1319 ++++++++++ backend/baseService/api/promotion.proto | 64 +- backend/baseService/api/promotion_grpc.pb.go | 283 +++ backend/baseService/api/refund.pb.go | 687 ++++++ backend/baseService/api/refund.proto | 29 +- backend/baseService/api/refund_grpc.pb.go | 175 ++ backend/baseService/api/trade.pb.go | 1421 +++++++++++ backend/baseService/api/trade.proto | 91 +- backend/baseService/api/trade_entities.pb.go | 2247 ++++++++++++++++++ backend/baseService/api/trade_entities.proto | 21 +- backend/baseService/api/trade_grpc.pb.go | 319 +++ 16 files changed, 8465 insertions(+), 60 deletions(-) create mode 100644 backend/baseService/api/inventory.pb.go create mode 100644 backend/baseService/api/inventory.proto create mode 100644 backend/baseService/api/inventory_grpc.pb.go create mode 100644 backend/baseService/api/pay.pb.go create mode 100644 backend/baseService/api/pay_grpc.pb.go create mode 100644 backend/baseService/api/promotion.pb.go create mode 100644 backend/baseService/api/promotion_grpc.pb.go create mode 100644 backend/baseService/api/refund.pb.go create mode 100644 backend/baseService/api/refund_grpc.pb.go create mode 100644 backend/baseService/api/trade.pb.go create mode 100644 backend/baseService/api/trade_entities.pb.go create mode 100644 backend/baseService/api/trade_grpc.pb.go diff --git a/backend/baseService/api/inventory.pb.go b/backend/baseService/api/inventory.pb.go new file mode 100644 index 0000000..cb39aa7 --- /dev/null +++ b/backend/baseService/api/inventory.pb.go @@ -0,0 +1,1254 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v5.27.1 +// source: inventory.proto + +package api + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type OccupyType int32 + +const ( + OccupyType_FOREVER OccupyType = 0 // 永久占用 + OccupyType_TEMPORARY OccupyType = 1 // 临时占用 +) + +// Enum value maps for OccupyType. +var ( + OccupyType_name = map[int32]string{ + 0: "FOREVER", + 1: "TEMPORARY", + } + OccupyType_value = map[string]int32{ + "FOREVER": 0, + "TEMPORARY": 1, + } +) + +func (x OccupyType) Enum() *OccupyType { + p := new(OccupyType) + *p = x + return p +} + +func (x OccupyType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OccupyType) Descriptor() protoreflect.EnumDescriptor { + return file_inventory_proto_enumTypes[0].Descriptor() +} + +func (OccupyType) Type() protoreflect.EnumType { + return &file_inventory_proto_enumTypes[0] +} + +func (x OccupyType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use OccupyType.Descriptor instead. +func (OccupyType) EnumDescriptor() ([]byte, []int) { + return file_inventory_proto_rawDescGZIP(), []int{0} +} + +type OperateType int32 + +const ( + OperateType_PRE OperateType = 0 // 预占用 + OperateType_OCCUPY OperateType = 1 // 占用 + OperateType_RELEASE OperateType = 2 // 释放 +) + +// Enum value maps for OperateType. +var ( + OperateType_name = map[int32]string{ + 0: "PRE", + 1: "OCCUPY", + 2: "RELEASE", + } + OperateType_value = map[string]int32{ + "PRE": 0, + "OCCUPY": 1, + "RELEASE": 2, + } +) + +func (x OperateType) Enum() *OperateType { + p := new(OperateType) + *p = x + return p +} + +func (x OperateType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OperateType) Descriptor() protoreflect.EnumDescriptor { + return file_inventory_proto_enumTypes[1].Descriptor() +} + +func (OperateType) Type() protoreflect.EnumType { + return &file_inventory_proto_enumTypes[1] +} + +func (x OperateType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use OperateType.Descriptor instead. +func (OperateType) EnumDescriptor() ([]byte, []int) { + return file_inventory_proto_rawDescGZIP(), []int{1} +} + +type InventoryStatus int32 + +const ( + InventoryStatus_IDLE InventoryStatus = 0 // 空闲 + InventoryStatus_PRE_OCCUPIED InventoryStatus = 1 // 预占用 + InventoryStatus_OCCUPIED InventoryStatus = 2 // 已占用 +) + +// Enum value maps for InventoryStatus. +var ( + InventoryStatus_name = map[int32]string{ + 0: "IDLE", + 1: "PRE_OCCUPIED", + 2: "OCCUPIED", + } + InventoryStatus_value = map[string]int32{ + "IDLE": 0, + "PRE_OCCUPIED": 1, + "OCCUPIED": 2, + } +) + +func (x InventoryStatus) Enum() *InventoryStatus { + p := new(InventoryStatus) + *p = x + return p +} + +func (x InventoryStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (InventoryStatus) Descriptor() protoreflect.EnumDescriptor { + return file_inventory_proto_enumTypes[2].Descriptor() +} + +func (InventoryStatus) Type() protoreflect.EnumType { + return &file_inventory_proto_enumTypes[2] +} + +func (x InventoryStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use InventoryStatus.Descriptor instead. +func (InventoryStatus) EnumDescriptor() ([]byte, []int) { + return file_inventory_proto_rawDescGZIP(), []int{2} +} + +type UpdateGoodsType int32 + +const ( + UpdateGoodsType_ADD UpdateGoodsType = 0 // 增加库存 + UpdateGoodsType_SUB UpdateGoodsType = 1 // 减少库存 +) + +// Enum value maps for UpdateGoodsType. +var ( + UpdateGoodsType_name = map[int32]string{ + 0: "ADD", + 1: "SUB", + } + UpdateGoodsType_value = map[string]int32{ + "ADD": 0, + "SUB": 1, + } +) + +func (x UpdateGoodsType) Enum() *UpdateGoodsType { + p := new(UpdateGoodsType) + *p = x + return p +} + +func (x UpdateGoodsType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (UpdateGoodsType) Descriptor() protoreflect.EnumDescriptor { + return file_inventory_proto_enumTypes[3].Descriptor() +} + +func (UpdateGoodsType) Type() protoreflect.EnumType { + return &file_inventory_proto_enumTypes[3] +} + +func (x UpdateGoodsType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use UpdateGoodsType.Descriptor instead. +func (UpdateGoodsType) EnumDescriptor() ([]byte, []int) { + return file_inventory_proto_rawDescGZIP(), []int{3} +} + +type InventoryGood struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 商品id + BizId int64 `protobuf:"varint,2,opt,name=biz_id,json=bizId,proto3" json:"biz_id,omitempty"` // 业务id + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // 商品名称 + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` // 商品描述 + Quantity uint64 `protobuf:"varint,5,opt,name=quantity,proto3" json:"quantity,omitempty"` // 库存数量 +} + +func (x *InventoryGood) Reset() { + *x = InventoryGood{} + if protoimpl.UnsafeEnabled { + mi := &file_inventory_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InventoryGood) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InventoryGood) ProtoMessage() {} + +func (x *InventoryGood) ProtoReflect() protoreflect.Message { + mi := &file_inventory_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InventoryGood.ProtoReflect.Descriptor instead. +func (*InventoryGood) Descriptor() ([]byte, []int) { + return file_inventory_proto_rawDescGZIP(), []int{0} +} + +func (x *InventoryGood) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *InventoryGood) GetBizId() int64 { + if x != nil { + return x.BizId + } + return 0 +} + +func (x *InventoryGood) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *InventoryGood) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *InventoryGood) GetQuantity() uint64 { + if x != nil { + return x.Quantity + } + return 0 +} + +type Inventory struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 库存记录id + OccupyType OccupyType `protobuf:"varint,2,opt,name=occupy_type,json=occupyType,proto3,enum=api.OccupyType" json:"occupy_type,omitempty"` // 占用类型 + OperateType OperateType `protobuf:"varint,3,opt,name=operate_type,json=operateType,proto3,enum=api.OperateType" json:"operate_type,omitempty"` // 操作类型 + InventoryStatus InventoryStatus `protobuf:"varint,4,opt,name=inventory_status,json=inventoryStatus,proto3,enum=api.InventoryStatus" json:"inventory_status,omitempty"` // 库存状态 + BizId int64 `protobuf:"varint,5,opt,name=biz_id,json=bizId,proto3" json:"biz_id,omitempty"` // 业务id + CreateTime int64 `protobuf:"varint,6,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` // 创建时间 + StartTime int64 `protobuf:"varint,7,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // 开始时间 + EndTime int64 `protobuf:"varint,8,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // 结束时间 + Buffer int64 `protobuf:"varint,9,opt,name=buffer,proto3" json:"buffer,omitempty"` // 库存释放时的缓冲时间 + ActualReleaseTime int64 `protobuf:"varint,10,opt,name=actual_release_time,json=actualReleaseTime,proto3" json:"actual_release_time,omitempty"` // 实际释放时间 +} + +func (x *Inventory) Reset() { + *x = Inventory{} + if protoimpl.UnsafeEnabled { + mi := &file_inventory_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Inventory) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Inventory) ProtoMessage() {} + +func (x *Inventory) ProtoReflect() protoreflect.Message { + mi := &file_inventory_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Inventory.ProtoReflect.Descriptor instead. +func (*Inventory) Descriptor() ([]byte, []int) { + return file_inventory_proto_rawDescGZIP(), []int{1} +} + +func (x *Inventory) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Inventory) GetOccupyType() OccupyType { + if x != nil { + return x.OccupyType + } + return OccupyType_FOREVER +} + +func (x *Inventory) GetOperateType() OperateType { + if x != nil { + return x.OperateType + } + return OperateType_PRE +} + +func (x *Inventory) GetInventoryStatus() InventoryStatus { + if x != nil { + return x.InventoryStatus + } + return InventoryStatus_IDLE +} + +func (x *Inventory) GetBizId() int64 { + if x != nil { + return x.BizId + } + return 0 +} + +func (x *Inventory) GetCreateTime() int64 { + if x != nil { + return x.CreateTime + } + return 0 +} + +func (x *Inventory) GetStartTime() int64 { + if x != nil { + return x.StartTime + } + return 0 +} + +func (x *Inventory) GetEndTime() int64 { + if x != nil { + return x.EndTime + } + return 0 +} + +func (x *Inventory) GetBuffer() int64 { + if x != nil { + return x.Buffer + } + return 0 +} + +func (x *Inventory) GetActualReleaseTime() int64 { + if x != nil { + return x.ActualReleaseTime + } + return 0 +} + +type CreateGoodRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BizId int64 `protobuf:"varint,1,opt,name=biz_id,json=bizId,proto3" json:"biz_id,omitempty"` // 商品id + Quantity uint64 `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"` // 库存数量 + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // 商品名称 + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` // 商品描述 +} + +func (x *CreateGoodRequest) Reset() { + *x = CreateGoodRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_inventory_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateGoodRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateGoodRequest) ProtoMessage() {} + +func (x *CreateGoodRequest) ProtoReflect() protoreflect.Message { + mi := &file_inventory_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateGoodRequest.ProtoReflect.Descriptor instead. +func (*CreateGoodRequest) Descriptor() ([]byte, []int) { + return file_inventory_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateGoodRequest) GetBizId() int64 { + if x != nil { + return x.BizId + } + return 0 +} + +func (x *CreateGoodRequest) GetQuantity() uint64 { + if x != nil { + return x.Quantity + } + return 0 +} + +func (x *CreateGoodRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateGoodRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +type CreateGoodResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + InventoryGood *InventoryGood `protobuf:"bytes,2,opt,name=inventory_good,json=inventoryGood,proto3" json:"inventory_good,omitempty"` +} + +func (x *CreateGoodResponse) Reset() { + *x = CreateGoodResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_inventory_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateGoodResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateGoodResponse) ProtoMessage() {} + +func (x *CreateGoodResponse) ProtoReflect() protoreflect.Message { + mi := &file_inventory_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateGoodResponse.ProtoReflect.Descriptor instead. +func (*CreateGoodResponse) Descriptor() ([]byte, []int) { + return file_inventory_proto_rawDescGZIP(), []int{3} +} + +func (x *CreateGoodResponse) GetMeta() *Metadata { + if x != nil { + return x.Meta + } + return nil +} + +func (x *CreateGoodResponse) GetInventoryGood() *InventoryGood { + if x != nil { + return x.InventoryGood + } + return nil +} + +type QueryGoodsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BizIdList []int64 `protobuf:"varint,1,rep,packed,name=biz_id_list,json=bizIdList,proto3" json:"biz_id_list,omitempty"` // 业务id列表 + IdList []int64 `protobuf:"varint,2,rep,packed,name=id_list,json=idList,proto3" json:"id_list,omitempty"` // 商品id列表 +} + +func (x *QueryGoodsRequest) Reset() { + *x = QueryGoodsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_inventory_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGoodsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGoodsRequest) ProtoMessage() {} + +func (x *QueryGoodsRequest) ProtoReflect() protoreflect.Message { + mi := &file_inventory_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryGoodsRequest.ProtoReflect.Descriptor instead. +func (*QueryGoodsRequest) Descriptor() ([]byte, []int) { + return file_inventory_proto_rawDescGZIP(), []int{4} +} + +func (x *QueryGoodsRequest) GetBizIdList() []int64 { + if x != nil { + return x.BizIdList + } + return nil +} + +func (x *QueryGoodsRequest) GetIdList() []int64 { + if x != nil { + return x.IdList + } + return nil +} + +type QueryGoodsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + InventoryGoodList []*InventoryGood `protobuf:"bytes,2,rep,name=inventory_good_list,json=inventoryGoodList,proto3" json:"inventory_good_list,omitempty"` +} + +func (x *QueryGoodsResponse) Reset() { + *x = QueryGoodsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_inventory_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGoodsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGoodsResponse) ProtoMessage() {} + +func (x *QueryGoodsResponse) ProtoReflect() protoreflect.Message { + mi := &file_inventory_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryGoodsResponse.ProtoReflect.Descriptor instead. +func (*QueryGoodsResponse) Descriptor() ([]byte, []int) { + return file_inventory_proto_rawDescGZIP(), []int{5} +} + +func (x *QueryGoodsResponse) GetMeta() *Metadata { + if x != nil { + return x.Meta + } + return nil +} + +func (x *QueryGoodsResponse) GetInventoryGoodList() []*InventoryGood { + if x != nil { + return x.InventoryGoodList + } + return nil +} + +type UpdateGoodsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 商品库存id + Quantity uint64 `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"` // 库存数量 + UpdateGoodsType UpdateGoodsType `protobuf:"varint,3,opt,name=update_goods_type,json=updateGoodsType,proto3,enum=api.UpdateGoodsType" json:"update_goods_type,omitempty"` // 更新库存类型 +} + +func (x *UpdateGoodsRequest) Reset() { + *x = UpdateGoodsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_inventory_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateGoodsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateGoodsRequest) ProtoMessage() {} + +func (x *UpdateGoodsRequest) ProtoReflect() protoreflect.Message { + mi := &file_inventory_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateGoodsRequest.ProtoReflect.Descriptor instead. +func (*UpdateGoodsRequest) Descriptor() ([]byte, []int) { + return file_inventory_proto_rawDescGZIP(), []int{6} +} + +func (x *UpdateGoodsRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *UpdateGoodsRequest) GetQuantity() uint64 { + if x != nil { + return x.Quantity + } + return 0 +} + +func (x *UpdateGoodsRequest) GetUpdateGoodsType() UpdateGoodsType { + if x != nil { + return x.UpdateGoodsType + } + return UpdateGoodsType_ADD +} + +type UpdateGoodsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + InventoryGood *InventoryGood `protobuf:"bytes,2,opt,name=inventory_good,json=inventoryGood,proto3" json:"inventory_good,omitempty"` +} + +func (x *UpdateGoodsResponse) Reset() { + *x = UpdateGoodsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_inventory_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateGoodsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateGoodsResponse) ProtoMessage() {} + +func (x *UpdateGoodsResponse) ProtoReflect() protoreflect.Message { + mi := &file_inventory_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateGoodsResponse.ProtoReflect.Descriptor instead. +func (*UpdateGoodsResponse) Descriptor() ([]byte, []int) { + return file_inventory_proto_rawDescGZIP(), []int{7} +} + +func (x *UpdateGoodsResponse) GetMeta() *Metadata { + if x != nil { + return x.Meta + } + return nil +} + +func (x *UpdateGoodsResponse) GetInventoryGood() *InventoryGood { + if x != nil { + return x.InventoryGood + } + return nil +} + +type OperateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OperateType OperateType `protobuf:"varint,1,opt,name=operate_type,json=operateType,proto3,enum=api.OperateType" json:"operate_type,omitempty"` // 操作类型 + OccupyType OccupyType `protobuf:"varint,2,opt,name=occupy_type,json=occupyType,proto3,enum=api.OccupyType" json:"occupy_type,omitempty"` // 占用类型 + InventoryGoodId int64 `protobuf:"varint,3,opt,name=inventory_good_id,json=inventoryGoodId,proto3" json:"inventory_good_id,omitempty"` // 库存商品id + BizId int64 `protobuf:"varint,4,opt,name=biz_id,json=bizId,proto3" json:"biz_id,omitempty"` // 业务id + StartTime int64 `protobuf:"varint,5,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // 开始时间 + EndTime int64 `protobuf:"varint,6,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // 结束时间 + Buffer int64 `protobuf:"varint,7,opt,name=buffer,proto3" json:"buffer,omitempty"` // 库存释放时的缓冲时间 +} + +func (x *OperateRequest) Reset() { + *x = OperateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_inventory_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OperateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperateRequest) ProtoMessage() {} + +func (x *OperateRequest) ProtoReflect() protoreflect.Message { + mi := &file_inventory_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperateRequest.ProtoReflect.Descriptor instead. +func (*OperateRequest) Descriptor() ([]byte, []int) { + return file_inventory_proto_rawDescGZIP(), []int{8} +} + +func (x *OperateRequest) GetOperateType() OperateType { + if x != nil { + return x.OperateType + } + return OperateType_PRE +} + +func (x *OperateRequest) GetOccupyType() OccupyType { + if x != nil { + return x.OccupyType + } + return OccupyType_FOREVER +} + +func (x *OperateRequest) GetInventoryGoodId() int64 { + if x != nil { + return x.InventoryGoodId + } + return 0 +} + +func (x *OperateRequest) GetBizId() int64 { + if x != nil { + return x.BizId + } + return 0 +} + +func (x *OperateRequest) GetStartTime() int64 { + if x != nil { + return x.StartTime + } + return 0 +} + +func (x *OperateRequest) GetEndTime() int64 { + if x != nil { + return x.EndTime + } + return 0 +} + +func (x *OperateRequest) GetBuffer() int64 { + if x != nil { + return x.Buffer + } + return 0 +} + +type OperateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` +} + +func (x *OperateResponse) Reset() { + *x = OperateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_inventory_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OperateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperateResponse) ProtoMessage() {} + +func (x *OperateResponse) ProtoReflect() protoreflect.Message { + mi := &file_inventory_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperateResponse.ProtoReflect.Descriptor instead. +func (*OperateResponse) Descriptor() ([]byte, []int) { + return file_inventory_proto_rawDescGZIP(), []int{9} +} + +func (x *OperateResponse) GetMeta() *Metadata { + if x != nil { + return x.Meta + } + return nil +} + +var File_inventory_proto protoreflect.FileDescriptor + +var file_inventory_proto_rawDesc = []byte{ + 0x0a, 0x0f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x88, 0x01, 0x0a, 0x0d, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x47, 0x6f, 0x6f, + 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x69, 0x7a, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x05, 0x62, 0x69, 0x7a, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, + 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0xfd, 0x02, 0x0a, 0x09, 0x49, + 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x0b, 0x6f, 0x63, 0x63, 0x75, + 0x70, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x63, 0x63, 0x75, 0x70, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, + 0x6f, 0x63, 0x63, 0x75, 0x70, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x33, 0x0a, 0x0c, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x3f, 0x0a, 0x10, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x0f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x15, 0x0a, 0x06, 0x62, 0x69, 0x7a, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x05, 0x62, 0x69, 0x7a, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x13, 0x61, 0x63, + 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x52, + 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x7c, 0x0a, 0x11, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x47, 0x6f, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x15, 0x0a, 0x06, 0x62, 0x69, 0x7a, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x62, 0x69, 0x7a, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x72, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x47, 0x6f, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, + 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, + 0x61, 0x12, 0x39, 0x0a, 0x0e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x67, + 0x6f, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x47, 0x6f, 0x6f, 0x64, 0x52, 0x0d, 0x69, + 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x47, 0x6f, 0x6f, 0x64, 0x22, 0x4c, 0x0a, 0x11, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1e, 0x0a, 0x0b, 0x62, 0x69, 0x7a, 0x5f, 0x69, 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x09, 0x62, 0x69, 0x7a, 0x49, 0x64, 0x4c, 0x69, 0x73, + 0x74, 0x12, 0x17, 0x0a, 0x07, 0x69, 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x03, 0x52, 0x06, 0x69, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x7b, 0x0a, 0x12, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x21, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6d, + 0x65, 0x74, 0x61, 0x12, 0x42, 0x0a, 0x13, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, + 0x5f, 0x67, 0x6f, 0x6f, 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, + 0x47, 0x6f, 0x6f, 0x64, 0x52, 0x11, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x47, + 0x6f, 0x6f, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x82, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, + 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x40, 0x0a, 0x11, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x73, 0x0a, 0x13, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x0e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, + 0x6f, 0x72, 0x79, 0x5f, 0x67, 0x6f, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x47, 0x6f, + 0x6f, 0x64, 0x52, 0x0d, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x47, 0x6f, 0x6f, + 0x64, 0x22, 0x8c, 0x02, 0x0a, 0x0e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x0b, 0x6f, 0x63, 0x63, + 0x75, 0x70, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x63, 0x63, 0x75, 0x70, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x0a, 0x6f, 0x63, 0x63, 0x75, 0x70, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x69, + 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x67, 0x6f, 0x6f, 0x64, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, + 0x79, 0x47, 0x6f, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x69, 0x7a, 0x5f, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x62, 0x69, 0x7a, 0x49, 0x64, 0x12, 0x1d, + 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, + 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x66, 0x66, + 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, + 0x22, 0x34, 0x0a, 0x0f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x2a, 0x28, 0x0a, 0x0a, 0x4f, 0x63, 0x63, 0x75, 0x70, 0x79, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x4f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x10, + 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, 0x59, 0x10, 0x01, + 0x2a, 0x2f, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x07, 0x0a, 0x03, 0x50, 0x52, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x43, 0x43, 0x55, + 0x50, 0x59, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x4c, 0x45, 0x41, 0x53, 0x45, 0x10, + 0x02, 0x2a, 0x3b, 0x0a, 0x0f, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x44, 0x4c, 0x45, 0x10, 0x00, 0x12, 0x10, + 0x0a, 0x0c, 0x50, 0x52, 0x45, 0x5f, 0x4f, 0x43, 0x43, 0x55, 0x50, 0x49, 0x45, 0x44, 0x10, 0x01, + 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x43, 0x43, 0x55, 0x50, 0x49, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x23, + 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x44, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x55, + 0x42, 0x10, 0x01, 0x32, 0xa3, 0x02, 0x0a, 0x10, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, + 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x46, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x47, 0x6f, 0x6f, 0x64, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x12, + 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x6f, 0x6f, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x47, 0x6f, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x46, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x6e, + 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x6f, 0x6f, 0x64, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, + 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x6f, 0x6f, + 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x12, 0x13, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x7a, 0x65, 0x6e, + 0x69, 0x74, 0x68, 0x2f, 0x44, 0x6f, 0x75, 0x54, 0x6f, 0x6b, 0x2f, 0x2e, 0x2e, 0x2e, 0x3b, 0x61, + 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_inventory_proto_rawDescOnce sync.Once + file_inventory_proto_rawDescData = file_inventory_proto_rawDesc +) + +func file_inventory_proto_rawDescGZIP() []byte { + file_inventory_proto_rawDescOnce.Do(func() { + file_inventory_proto_rawDescData = protoimpl.X.CompressGZIP(file_inventory_proto_rawDescData) + }) + return file_inventory_proto_rawDescData +} + +var file_inventory_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_inventory_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_inventory_proto_goTypes = []interface{}{ + (OccupyType)(0), // 0: api.OccupyType + (OperateType)(0), // 1: api.OperateType + (InventoryStatus)(0), // 2: api.InventoryStatus + (UpdateGoodsType)(0), // 3: api.UpdateGoodsType + (*InventoryGood)(nil), // 4: api.InventoryGood + (*Inventory)(nil), // 5: api.Inventory + (*CreateGoodRequest)(nil), // 6: api.CreateGoodRequest + (*CreateGoodResponse)(nil), // 7: api.CreateGoodResponse + (*QueryGoodsRequest)(nil), // 8: api.QueryGoodsRequest + (*QueryGoodsResponse)(nil), // 9: api.QueryGoodsResponse + (*UpdateGoodsRequest)(nil), // 10: api.UpdateGoodsRequest + (*UpdateGoodsResponse)(nil), // 11: api.UpdateGoodsResponse + (*OperateRequest)(nil), // 12: api.OperateRequest + (*OperateResponse)(nil), // 13: api.OperateResponse + (*Metadata)(nil), // 14: api.Metadata +} +var file_inventory_proto_depIdxs = []int32{ + 0, // 0: api.Inventory.occupy_type:type_name -> api.OccupyType + 1, // 1: api.Inventory.operate_type:type_name -> api.OperateType + 2, // 2: api.Inventory.inventory_status:type_name -> api.InventoryStatus + 14, // 3: api.CreateGoodResponse.meta:type_name -> api.Metadata + 4, // 4: api.CreateGoodResponse.inventory_good:type_name -> api.InventoryGood + 14, // 5: api.QueryGoodsResponse.meta:type_name -> api.Metadata + 4, // 6: api.QueryGoodsResponse.inventory_good_list:type_name -> api.InventoryGood + 3, // 7: api.UpdateGoodsRequest.update_goods_type:type_name -> api.UpdateGoodsType + 14, // 8: api.UpdateGoodsResponse.meta:type_name -> api.Metadata + 4, // 9: api.UpdateGoodsResponse.inventory_good:type_name -> api.InventoryGood + 1, // 10: api.OperateRequest.operate_type:type_name -> api.OperateType + 0, // 11: api.OperateRequest.occupy_type:type_name -> api.OccupyType + 14, // 12: api.OperateResponse.meta:type_name -> api.Metadata + 6, // 13: api.InventoryService.CreateGoodInventory:input_type -> api.CreateGoodRequest + 8, // 14: api.InventoryService.QueryGoodsInventory:input_type -> api.QueryGoodsRequest + 10, // 15: api.InventoryService.UpdateGoodsInventory:input_type -> api.UpdateGoodsRequest + 12, // 16: api.InventoryService.Operate:input_type -> api.OperateRequest + 7, // 17: api.InventoryService.CreateGoodInventory:output_type -> api.CreateGoodResponse + 9, // 18: api.InventoryService.QueryGoodsInventory:output_type -> api.QueryGoodsResponse + 11, // 19: api.InventoryService.UpdateGoodsInventory:output_type -> api.UpdateGoodsResponse + 13, // 20: api.InventoryService.Operate:output_type -> api.OperateResponse + 17, // [17:21] is the sub-list for method output_type + 13, // [13:17] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name +} + +func init() { file_inventory_proto_init() } +func file_inventory_proto_init() { + if File_inventory_proto != nil { + return + } + file_base_proto_init() + if !protoimpl.UnsafeEnabled { + file_inventory_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InventoryGood); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inventory_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Inventory); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inventory_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateGoodRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inventory_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateGoodResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inventory_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGoodsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inventory_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGoodsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inventory_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateGoodsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inventory_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateGoodsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inventory_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OperateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inventory_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OperateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_inventory_proto_rawDesc, + NumEnums: 4, + NumMessages: 10, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_inventory_proto_goTypes, + DependencyIndexes: file_inventory_proto_depIdxs, + EnumInfos: file_inventory_proto_enumTypes, + MessageInfos: file_inventory_proto_msgTypes, + }.Build() + File_inventory_proto = out.File + file_inventory_proto_rawDesc = nil + file_inventory_proto_goTypes = nil + file_inventory_proto_depIdxs = nil +} diff --git a/backend/baseService/api/inventory.proto b/backend/baseService/api/inventory.proto new file mode 100644 index 0000000..f7cf97a --- /dev/null +++ b/backend/baseService/api/inventory.proto @@ -0,0 +1,104 @@ +syntax = "proto3"; +package api; + +option go_package = "github.com/cloudzenith/DouTok/...;api"; + +import "base.proto"; +import "buf/validate/validate.proto"; + +enum OccupyType { + FOREVER = 0; // 永久占用 + TEMPORARY = 1; // 临时占用 +} + +enum OperateType { + PRE = 0; // 预占用 + OCCUPY = 1; // 占用 + RELEASE = 2; // 释放 +} + +enum InventoryStatus { + IDLE = 0; // 空闲 + PRE_OCCUPIED = 1; // 预占用 + OCCUPIED = 2; // 已占用 +} + +message InventoryGood { + int64 id = 1; // 商品id + int64 biz_id = 2; // 业务id + string name = 3; // 商品名称 + string description = 4; // 商品描述 + uint64 quantity = 5; // 库存数量 +} + +message Inventory { + int64 id = 1; // 库存记录id + OccupyType occupy_type = 2; // 占用类型 + OperateType operate_type = 3; // 操作类型 + InventoryStatus inventory_status = 4; // 库存状态 + int64 biz_id = 5; // 业务id + int64 create_time = 6; // 创建时间 + int64 start_time = 7; // 开始时间 + int64 end_time = 8; // 结束时间 + int64 buffer = 9; // 库存释放时的缓冲时间 + int64 actual_release_time = 10; // 实际释放时间 +} + +service InventoryService { + rpc CreateGoodInventory(CreateGoodRequest) returns (CreateGoodResponse); // 创建商品库存 + rpc QueryGoodsInventory(QueryGoodsRequest) returns (QueryGoodsResponse); // 查询商品库存 + rpc UpdateGoodsInventory(UpdateGoodsRequest) returns (UpdateGoodsResponse); // 更新商品库存 + rpc Operate(OperateRequest) returns (OperateResponse); // 库存操作 +} + +message CreateGoodRequest { + int64 biz_id = 1; // 商品id + uint64 quantity = 2; // 库存数量 + string name = 3; // 商品名称 + string description = 4; // 商品描述 +} + +message CreateGoodResponse { + api.Metadata meta = 1; + InventoryGood inventory_good = 2; +} + +message QueryGoodsRequest { + repeated int64 biz_id_list = 1; // 业务id列表 + repeated int64 id_list = 2; // 商品id列表 +} + +message QueryGoodsResponse { + api.Metadata meta = 1; + repeated InventoryGood inventory_good_list = 2; +} + +enum UpdateGoodsType { + ADD = 0; // 增加库存 + SUB = 1; // 减少库存 +} + +message UpdateGoodsRequest { + int64 id = 1; // 商品库存id + uint64 quantity = 2; // 库存数量 + UpdateGoodsType update_goods_type = 3; // 更新库存类型 +} + +message UpdateGoodsResponse { + api.Metadata meta = 1; + InventoryGood inventory_good = 2; +} + +message OperateRequest { + OperateType operate_type = 1; // 操作类型 + OccupyType occupy_type = 2; // 占用类型 + int64 inventory_good_id = 3; // 库存商品id + int64 biz_id = 4; // 业务id + int64 start_time = 5; // 开始时间 + int64 end_time = 6; // 结束时间 + int64 buffer = 7; // 库存释放时的缓冲时间 +} + +message OperateResponse { + api.Metadata meta = 1; +} diff --git a/backend/baseService/api/inventory_grpc.pb.go b/backend/baseService/api/inventory_grpc.pb.go new file mode 100644 index 0000000..d166ee7 --- /dev/null +++ b/backend/baseService/api/inventory_grpc.pb.go @@ -0,0 +1,211 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v5.27.1 +// source: inventory.proto + +package api + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// InventoryServiceClient is the client API for InventoryService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type InventoryServiceClient interface { + CreateGoodInventory(ctx context.Context, in *CreateGoodRequest, opts ...grpc.CallOption) (*CreateGoodResponse, error) + QueryGoodsInventory(ctx context.Context, in *QueryGoodsRequest, opts ...grpc.CallOption) (*QueryGoodsResponse, error) + UpdateGoodsInventory(ctx context.Context, in *UpdateGoodsRequest, opts ...grpc.CallOption) (*UpdateGoodsResponse, error) + Operate(ctx context.Context, in *OperateRequest, opts ...grpc.CallOption) (*OperateResponse, error) +} + +type inventoryServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewInventoryServiceClient(cc grpc.ClientConnInterface) InventoryServiceClient { + return &inventoryServiceClient{cc} +} + +func (c *inventoryServiceClient) CreateGoodInventory(ctx context.Context, in *CreateGoodRequest, opts ...grpc.CallOption) (*CreateGoodResponse, error) { + out := new(CreateGoodResponse) + err := c.cc.Invoke(ctx, "/api.InventoryService/CreateGoodInventory", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *inventoryServiceClient) QueryGoodsInventory(ctx context.Context, in *QueryGoodsRequest, opts ...grpc.CallOption) (*QueryGoodsResponse, error) { + out := new(QueryGoodsResponse) + err := c.cc.Invoke(ctx, "/api.InventoryService/QueryGoodsInventory", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *inventoryServiceClient) UpdateGoodsInventory(ctx context.Context, in *UpdateGoodsRequest, opts ...grpc.CallOption) (*UpdateGoodsResponse, error) { + out := new(UpdateGoodsResponse) + err := c.cc.Invoke(ctx, "/api.InventoryService/UpdateGoodsInventory", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *inventoryServiceClient) Operate(ctx context.Context, in *OperateRequest, opts ...grpc.CallOption) (*OperateResponse, error) { + out := new(OperateResponse) + err := c.cc.Invoke(ctx, "/api.InventoryService/Operate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// InventoryServiceServer is the server API for InventoryService service. +// All implementations should embed UnimplementedInventoryServiceServer +// for forward compatibility +type InventoryServiceServer interface { + CreateGoodInventory(context.Context, *CreateGoodRequest) (*CreateGoodResponse, error) + QueryGoodsInventory(context.Context, *QueryGoodsRequest) (*QueryGoodsResponse, error) + UpdateGoodsInventory(context.Context, *UpdateGoodsRequest) (*UpdateGoodsResponse, error) + Operate(context.Context, *OperateRequest) (*OperateResponse, error) +} + +// UnimplementedInventoryServiceServer should be embedded to have forward compatible implementations. +type UnimplementedInventoryServiceServer struct { +} + +func (UnimplementedInventoryServiceServer) CreateGoodInventory(context.Context, *CreateGoodRequest) (*CreateGoodResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateGoodInventory not implemented") +} +func (UnimplementedInventoryServiceServer) QueryGoodsInventory(context.Context, *QueryGoodsRequest) (*QueryGoodsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryGoodsInventory not implemented") +} +func (UnimplementedInventoryServiceServer) UpdateGoodsInventory(context.Context, *UpdateGoodsRequest) (*UpdateGoodsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateGoodsInventory not implemented") +} +func (UnimplementedInventoryServiceServer) Operate(context.Context, *OperateRequest) (*OperateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Operate not implemented") +} + +// UnsafeInventoryServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to InventoryServiceServer will +// result in compilation errors. +type UnsafeInventoryServiceServer interface { + mustEmbedUnimplementedInventoryServiceServer() +} + +func RegisterInventoryServiceServer(s grpc.ServiceRegistrar, srv InventoryServiceServer) { + s.RegisterService(&InventoryService_ServiceDesc, srv) +} + +func _InventoryService_CreateGoodInventory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateGoodRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InventoryServiceServer).CreateGoodInventory(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.InventoryService/CreateGoodInventory", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InventoryServiceServer).CreateGoodInventory(ctx, req.(*CreateGoodRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InventoryService_QueryGoodsInventory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGoodsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InventoryServiceServer).QueryGoodsInventory(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.InventoryService/QueryGoodsInventory", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InventoryServiceServer).QueryGoodsInventory(ctx, req.(*QueryGoodsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InventoryService_UpdateGoodsInventory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateGoodsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InventoryServiceServer).UpdateGoodsInventory(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.InventoryService/UpdateGoodsInventory", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InventoryServiceServer).UpdateGoodsInventory(ctx, req.(*UpdateGoodsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InventoryService_Operate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OperateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InventoryServiceServer).Operate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.InventoryService/Operate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InventoryServiceServer).Operate(ctx, req.(*OperateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// InventoryService_ServiceDesc is the grpc.ServiceDesc for InventoryService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var InventoryService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.InventoryService", + HandlerType: (*InventoryServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateGoodInventory", + Handler: _InventoryService_CreateGoodInventory_Handler, + }, + { + MethodName: "QueryGoodsInventory", + Handler: _InventoryService_QueryGoodsInventory_Handler, + }, + { + MethodName: "UpdateGoodsInventory", + Handler: _InventoryService_UpdateGoodsInventory_Handler, + }, + { + MethodName: "Operate", + Handler: _InventoryService_Operate_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "inventory.proto", +} diff --git a/backend/baseService/api/pay.pb.go b/backend/baseService/api/pay.pb.go new file mode 100644 index 0000000..2a8536c --- /dev/null +++ b/backend/baseService/api/pay.pb.go @@ -0,0 +1,197 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v5.27.1 +// source: pay.proto + +package api + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PayRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PayRequest) Reset() { + *x = PayRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pay_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PayRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PayRequest) ProtoMessage() {} + +func (x *PayRequest) ProtoReflect() protoreflect.Message { + mi := &file_pay_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PayRequest.ProtoReflect.Descriptor instead. +func (*PayRequest) Descriptor() ([]byte, []int) { + return file_pay_proto_rawDescGZIP(), []int{0} +} + +type PayResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PayResponse) Reset() { + *x = PayResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pay_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PayResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PayResponse) ProtoMessage() {} + +func (x *PayResponse) ProtoReflect() protoreflect.Message { + mi := &file_pay_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PayResponse.ProtoReflect.Descriptor instead. +func (*PayResponse) Descriptor() ([]byte, []int) { + return file_pay_proto_rawDescGZIP(), []int{1} +} + +var File_pay_proto protoreflect.FileDescriptor + +var file_pay_proto_rawDesc = []byte{ + 0x0a, 0x09, 0x70, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, + 0x1a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x74, 0x72, + 0x61, 0x64, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x0c, 0x0a, 0x0a, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x0d, 0x0a, + 0x0b, 0x50, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x36, 0x0a, 0x0a, + 0x50, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x03, 0x50, 0x61, + 0x79, 0x12, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x7a, 0x65, 0x6e, 0x69, 0x74, 0x68, 0x2f, 0x44, + 0x6f, 0x75, 0x54, 0x6f, 0x6b, 0x2f, 0x2e, 0x2e, 0x2e, 0x3b, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_pay_proto_rawDescOnce sync.Once + file_pay_proto_rawDescData = file_pay_proto_rawDesc +) + +func file_pay_proto_rawDescGZIP() []byte { + file_pay_proto_rawDescOnce.Do(func() { + file_pay_proto_rawDescData = protoimpl.X.CompressGZIP(file_pay_proto_rawDescData) + }) + return file_pay_proto_rawDescData +} + +var file_pay_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_pay_proto_goTypes = []interface{}{ + (*PayRequest)(nil), // 0: api.PayRequest + (*PayResponse)(nil), // 1: api.PayResponse +} +var file_pay_proto_depIdxs = []int32{ + 0, // 0: api.PayService.Pay:input_type -> api.PayRequest + 1, // 1: api.PayService.Pay:output_type -> api.PayResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_pay_proto_init() } +func file_pay_proto_init() { + if File_pay_proto != nil { + return + } + file_base_proto_init() + file_trade_entities_proto_init() + if !protoimpl.UnsafeEnabled { + file_pay_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PayRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pay_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PayResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_pay_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_pay_proto_goTypes, + DependencyIndexes: file_pay_proto_depIdxs, + MessageInfos: file_pay_proto_msgTypes, + }.Build() + File_pay_proto = out.File + file_pay_proto_rawDesc = nil + file_pay_proto_goTypes = nil + file_pay_proto_depIdxs = nil +} diff --git a/backend/baseService/api/pay_grpc.pb.go b/backend/baseService/api/pay_grpc.pb.go new file mode 100644 index 0000000..ad3ece5 --- /dev/null +++ b/backend/baseService/api/pay_grpc.pb.go @@ -0,0 +1,103 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v5.27.1 +// source: pay.proto + +package api + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// PayServiceClient is the client API for PayService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type PayServiceClient interface { + Pay(ctx context.Context, in *PayRequest, opts ...grpc.CallOption) (*PayResponse, error) +} + +type payServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewPayServiceClient(cc grpc.ClientConnInterface) PayServiceClient { + return &payServiceClient{cc} +} + +func (c *payServiceClient) Pay(ctx context.Context, in *PayRequest, opts ...grpc.CallOption) (*PayResponse, error) { + out := new(PayResponse) + err := c.cc.Invoke(ctx, "/api.PayService/Pay", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PayServiceServer is the server API for PayService service. +// All implementations should embed UnimplementedPayServiceServer +// for forward compatibility +type PayServiceServer interface { + Pay(context.Context, *PayRequest) (*PayResponse, error) +} + +// UnimplementedPayServiceServer should be embedded to have forward compatible implementations. +type UnimplementedPayServiceServer struct { +} + +func (UnimplementedPayServiceServer) Pay(context.Context, *PayRequest) (*PayResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Pay not implemented") +} + +// UnsafePayServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PayServiceServer will +// result in compilation errors. +type UnsafePayServiceServer interface { + mustEmbedUnimplementedPayServiceServer() +} + +func RegisterPayServiceServer(s grpc.ServiceRegistrar, srv PayServiceServer) { + s.RegisterService(&PayService_ServiceDesc, srv) +} + +func _PayService_Pay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PayRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PayServiceServer).Pay(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.PayService/Pay", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PayServiceServer).Pay(ctx, req.(*PayRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// PayService_ServiceDesc is the grpc.ServiceDesc for PayService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PayService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.PayService", + HandlerType: (*PayServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Pay", + Handler: _PayService_Pay_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "pay.proto", +} diff --git a/backend/baseService/api/promotion.pb.go b/backend/baseService/api/promotion.pb.go new file mode 100644 index 0000000..c9b6401 --- /dev/null +++ b/backend/baseService/api/promotion.pb.go @@ -0,0 +1,1319 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v5.27.1 +// source: promotion.proto + +package api + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Promotion struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 优惠信息id + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 优惠信息名称 + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // 优惠信息描述 + PromotionType TradePromotionType `protobuf:"varint,4,opt,name=promotion_type,json=promotionType,proto3,enum=api.TradePromotionType" json:"promotion_type,omitempty"` // 优惠信息类型 +} + +func (x *Promotion) Reset() { + *x = Promotion{} + if protoimpl.UnsafeEnabled { + mi := &file_promotion_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Promotion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Promotion) ProtoMessage() {} + +func (x *Promotion) ProtoReflect() protoreflect.Message { + mi := &file_promotion_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Promotion.ProtoReflect.Descriptor instead. +func (*Promotion) Descriptor() ([]byte, []int) { + return file_promotion_proto_rawDescGZIP(), []int{0} +} + +func (x *Promotion) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Promotion) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Promotion) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Promotion) GetPromotionType() TradePromotionType { + if x != nil { + return x.PromotionType + } + return TradePromotionType_UNDEFINED_PT +} + +type PromotionCreateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // 优惠信息名称 + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // 优惠信息描述 + PromotionType TradePromotionType `protobuf:"varint,3,opt,name=promotion_type,json=promotionType,proto3,enum=api.TradePromotionType" json:"promotion_type,omitempty"` // 优惠信息类型 +} + +func (x *PromotionCreateRequest) Reset() { + *x = PromotionCreateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_promotion_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PromotionCreateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PromotionCreateRequest) ProtoMessage() {} + +func (x *PromotionCreateRequest) ProtoReflect() protoreflect.Message { + mi := &file_promotion_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PromotionCreateRequest.ProtoReflect.Descriptor instead. +func (*PromotionCreateRequest) Descriptor() ([]byte, []int) { + return file_promotion_proto_rawDescGZIP(), []int{1} +} + +func (x *PromotionCreateRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PromotionCreateRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *PromotionCreateRequest) GetPromotionType() TradePromotionType { + if x != nil { + return x.PromotionType + } + return TradePromotionType_UNDEFINED_PT +} + +type PromotionCreateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + Promotion *Promotion `protobuf:"bytes,2,opt,name=promotion,proto3" json:"promotion,omitempty"` +} + +func (x *PromotionCreateResponse) Reset() { + *x = PromotionCreateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_promotion_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PromotionCreateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PromotionCreateResponse) ProtoMessage() {} + +func (x *PromotionCreateResponse) ProtoReflect() protoreflect.Message { + mi := &file_promotion_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PromotionCreateResponse.ProtoReflect.Descriptor instead. +func (*PromotionCreateResponse) Descriptor() ([]byte, []int) { + return file_promotion_proto_rawDescGZIP(), []int{2} +} + +func (x *PromotionCreateResponse) GetMeta() *Metadata { + if x != nil { + return x.Meta + } + return nil +} + +func (x *PromotionCreateResponse) GetPromotion() *Promotion { + if x != nil { + return x.Promotion + } + return nil +} + +type PromotionQueryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IdList []int64 `protobuf:"varint,1,rep,packed,name=id_list,json=idList,proto3" json:"id_list,omitempty"` // 优惠信息id列表 + NameList []string `protobuf:"bytes,2,rep,name=name_list,json=nameList,proto3" json:"name_list,omitempty"` // 优惠信息名称列表 + PromotionTypeList []TradePromotionType `protobuf:"varint,3,rep,packed,name=promotion_type_list,json=promotionTypeList,proto3,enum=api.TradePromotionType" json:"promotion_type_list,omitempty"` // 优惠信息类型列表 +} + +func (x *PromotionQueryRequest) Reset() { + *x = PromotionQueryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_promotion_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PromotionQueryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PromotionQueryRequest) ProtoMessage() {} + +func (x *PromotionQueryRequest) ProtoReflect() protoreflect.Message { + mi := &file_promotion_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PromotionQueryRequest.ProtoReflect.Descriptor instead. +func (*PromotionQueryRequest) Descriptor() ([]byte, []int) { + return file_promotion_proto_rawDescGZIP(), []int{3} +} + +func (x *PromotionQueryRequest) GetIdList() []int64 { + if x != nil { + return x.IdList + } + return nil +} + +func (x *PromotionQueryRequest) GetNameList() []string { + if x != nil { + return x.NameList + } + return nil +} + +func (x *PromotionQueryRequest) GetPromotionTypeList() []TradePromotionType { + if x != nil { + return x.PromotionTypeList + } + return nil +} + +type PromotionQueryResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + PromotionList []*Promotion `protobuf:"bytes,2,rep,name=promotion_list,json=promotionList,proto3" json:"promotion_list,omitempty"` +} + +func (x *PromotionQueryResponse) Reset() { + *x = PromotionQueryResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_promotion_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PromotionQueryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PromotionQueryResponse) ProtoMessage() {} + +func (x *PromotionQueryResponse) ProtoReflect() protoreflect.Message { + mi := &file_promotion_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PromotionQueryResponse.ProtoReflect.Descriptor instead. +func (*PromotionQueryResponse) Descriptor() ([]byte, []int) { + return file_promotion_proto_rawDescGZIP(), []int{4} +} + +func (x *PromotionQueryResponse) GetMeta() *Metadata { + if x != nil { + return x.Meta + } + return nil +} + +func (x *PromotionQueryResponse) GetPromotionList() []*Promotion { + if x != nil { + return x.PromotionList + } + return nil +} + +type PromotionUpdateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 优惠信息id + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 优惠信息名称 + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // 优惠信息描述 + PromotionType TradePromotionType `protobuf:"varint,4,opt,name=promotion_type,json=promotionType,proto3,enum=api.TradePromotionType" json:"promotion_type,omitempty"` // 优惠信息类型 +} + +func (x *PromotionUpdateRequest) Reset() { + *x = PromotionUpdateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_promotion_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PromotionUpdateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PromotionUpdateRequest) ProtoMessage() {} + +func (x *PromotionUpdateRequest) ProtoReflect() protoreflect.Message { + mi := &file_promotion_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PromotionUpdateRequest.ProtoReflect.Descriptor instead. +func (*PromotionUpdateRequest) Descriptor() ([]byte, []int) { + return file_promotion_proto_rawDescGZIP(), []int{5} +} + +func (x *PromotionUpdateRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *PromotionUpdateRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PromotionUpdateRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *PromotionUpdateRequest) GetPromotionType() TradePromotionType { + if x != nil { + return x.PromotionType + } + return TradePromotionType_UNDEFINED_PT +} + +type PromotionUpdateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + Promotion *Promotion `protobuf:"bytes,2,opt,name=promotion,proto3" json:"promotion,omitempty"` +} + +func (x *PromotionUpdateResponse) Reset() { + *x = PromotionUpdateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_promotion_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PromotionUpdateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PromotionUpdateResponse) ProtoMessage() {} + +func (x *PromotionUpdateResponse) ProtoReflect() protoreflect.Message { + mi := &file_promotion_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PromotionUpdateResponse.ProtoReflect.Descriptor instead. +func (*PromotionUpdateResponse) Descriptor() ([]byte, []int) { + return file_promotion_proto_rawDescGZIP(), []int{6} +} + +func (x *PromotionUpdateResponse) GetMeta() *Metadata { + if x != nil { + return x.Meta + } + return nil +} + +func (x *PromotionUpdateResponse) GetPromotion() *Promotion { + if x != nil { + return x.Promotion + } + return nil +} + +type PromotionDeleteRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 优惠信息id +} + +func (x *PromotionDeleteRequest) Reset() { + *x = PromotionDeleteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_promotion_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PromotionDeleteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PromotionDeleteRequest) ProtoMessage() {} + +func (x *PromotionDeleteRequest) ProtoReflect() protoreflect.Message { + mi := &file_promotion_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PromotionDeleteRequest.ProtoReflect.Descriptor instead. +func (*PromotionDeleteRequest) Descriptor() ([]byte, []int) { + return file_promotion_proto_rawDescGZIP(), []int{7} +} + +func (x *PromotionDeleteRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +type PromotionDeleteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` +} + +func (x *PromotionDeleteResponse) Reset() { + *x = PromotionDeleteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_promotion_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PromotionDeleteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PromotionDeleteResponse) ProtoMessage() {} + +func (x *PromotionDeleteResponse) ProtoReflect() protoreflect.Message { + mi := &file_promotion_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PromotionDeleteResponse.ProtoReflect.Descriptor instead. +func (*PromotionDeleteResponse) Descriptor() ([]byte, []int) { + return file_promotion_proto_rawDescGZIP(), []int{8} +} + +func (x *PromotionDeleteResponse) GetMeta() *Metadata { + if x != nil { + return x.Meta + } + return nil +} + +type QuerySpecificPromotionItem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 优惠信息id + AccountId int64 `protobuf:"varint,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // 账户id +} + +func (x *QuerySpecificPromotionItem) Reset() { + *x = QuerySpecificPromotionItem{} + if protoimpl.UnsafeEnabled { + mi := &file_promotion_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuerySpecificPromotionItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuerySpecificPromotionItem) ProtoMessage() {} + +func (x *QuerySpecificPromotionItem) ProtoReflect() protoreflect.Message { + mi := &file_promotion_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QuerySpecificPromotionItem.ProtoReflect.Descriptor instead. +func (*QuerySpecificPromotionItem) Descriptor() ([]byte, []int) { + return file_promotion_proto_rawDescGZIP(), []int{9} +} + +func (x *QuerySpecificPromotionItem) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *QuerySpecificPromotionItem) GetAccountId() int64 { + if x != nil { + return x.AccountId + } + return 0 +} + +type QuerySpecificPromotionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + QuerySpecificPromotionItem []*QuerySpecificPromotionItem `protobuf:"bytes,1,rep,name=query_specific_promotion_item,json=querySpecificPromotionItem,proto3" json:"query_specific_promotion_item,omitempty"` +} + +func (x *QuerySpecificPromotionRequest) Reset() { + *x = QuerySpecificPromotionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_promotion_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuerySpecificPromotionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuerySpecificPromotionRequest) ProtoMessage() {} + +func (x *QuerySpecificPromotionRequest) ProtoReflect() protoreflect.Message { + mi := &file_promotion_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QuerySpecificPromotionRequest.ProtoReflect.Descriptor instead. +func (*QuerySpecificPromotionRequest) Descriptor() ([]byte, []int) { + return file_promotion_proto_rawDescGZIP(), []int{10} +} + +func (x *QuerySpecificPromotionRequest) GetQuerySpecificPromotionItem() []*QuerySpecificPromotionItem { + if x != nil { + return x.QuerySpecificPromotionItem + } + return nil +} + +type QuerySpecificPromotionResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 优惠信息id + AccountId int64 `protobuf:"varint,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // 账户id + EntryId int64 `protobuf:"varint,3,opt,name=entry_id,json=entryId,proto3" json:"entry_id,omitempty"` // 具体优惠id + Promotion *Promotion `protobuf:"bytes,4,opt,name=promotion,proto3" json:"promotion,omitempty"` +} + +func (x *QuerySpecificPromotionResult) Reset() { + *x = QuerySpecificPromotionResult{} + if protoimpl.UnsafeEnabled { + mi := &file_promotion_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuerySpecificPromotionResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuerySpecificPromotionResult) ProtoMessage() {} + +func (x *QuerySpecificPromotionResult) ProtoReflect() protoreflect.Message { + mi := &file_promotion_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QuerySpecificPromotionResult.ProtoReflect.Descriptor instead. +func (*QuerySpecificPromotionResult) Descriptor() ([]byte, []int) { + return file_promotion_proto_rawDescGZIP(), []int{11} +} + +func (x *QuerySpecificPromotionResult) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *QuerySpecificPromotionResult) GetAccountId() int64 { + if x != nil { + return x.AccountId + } + return 0 +} + +func (x *QuerySpecificPromotionResult) GetEntryId() int64 { + if x != nil { + return x.EntryId + } + return 0 +} + +func (x *QuerySpecificPromotionResult) GetPromotion() *Promotion { + if x != nil { + return x.Promotion + } + return nil +} + +type QuerySpecificPromotionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + PromotionList []*QuerySpecificPromotionResult `protobuf:"bytes,2,rep,name=promotion_list,json=promotionList,proto3" json:"promotion_list,omitempty"` +} + +func (x *QuerySpecificPromotionResponse) Reset() { + *x = QuerySpecificPromotionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_promotion_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuerySpecificPromotionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuerySpecificPromotionResponse) ProtoMessage() {} + +func (x *QuerySpecificPromotionResponse) ProtoReflect() protoreflect.Message { + mi := &file_promotion_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QuerySpecificPromotionResponse.ProtoReflect.Descriptor instead. +func (*QuerySpecificPromotionResponse) Descriptor() ([]byte, []int) { + return file_promotion_proto_rawDescGZIP(), []int{12} +} + +func (x *QuerySpecificPromotionResponse) GetMeta() *Metadata { + if x != nil { + return x.Meta + } + return nil +} + +func (x *QuerySpecificPromotionResponse) GetPromotionList() []*QuerySpecificPromotionResult { + if x != nil { + return x.PromotionList + } + return nil +} + +type CalculateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TotalAmount uint64 `protobuf:"varint,1,opt,name=total_amount,json=totalAmount,proto3" json:"total_amount,omitempty"` // 总金额 + PromotionEntryIdList []int64 `protobuf:"varint,2,rep,packed,name=promotion_entry_id_list,json=promotionEntryIdList,proto3" json:"promotion_entry_id_list,omitempty"` // 具体优惠信息id列表 +} + +func (x *CalculateRequest) Reset() { + *x = CalculateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_promotion_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CalculateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CalculateRequest) ProtoMessage() {} + +func (x *CalculateRequest) ProtoReflect() protoreflect.Message { + mi := &file_promotion_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CalculateRequest.ProtoReflect.Descriptor instead. +func (*CalculateRequest) Descriptor() ([]byte, []int) { + return file_promotion_proto_rawDescGZIP(), []int{13} +} + +func (x *CalculateRequest) GetTotalAmount() uint64 { + if x != nil { + return x.TotalAmount + } + return 0 +} + +func (x *CalculateRequest) GetPromotionEntryIdList() []int64 { + if x != nil { + return x.PromotionEntryIdList + } + return nil +} + +type CalculateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + CalculatedAmount uint64 `protobuf:"varint,2,opt,name=calculated_amount,json=calculatedAmount,proto3" json:"calculated_amount,omitempty"` // 计算后的金额 +} + +func (x *CalculateResponse) Reset() { + *x = CalculateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_promotion_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CalculateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CalculateResponse) ProtoMessage() {} + +func (x *CalculateResponse) ProtoReflect() protoreflect.Message { + mi := &file_promotion_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CalculateResponse.ProtoReflect.Descriptor instead. +func (*CalculateResponse) Descriptor() ([]byte, []int) { + return file_promotion_proto_rawDescGZIP(), []int{14} +} + +func (x *CalculateResponse) GetMeta() *Metadata { + if x != nil { + return x.Meta + } + return nil +} + +func (x *CalculateResponse) GetCalculatedAmount() uint64 { + if x != nil { + return x.CalculatedAmount + } + return 0 +} + +var File_promotion_proto protoreflect.FileDescriptor + +var file_promotion_proto_rawDesc = []byte{ + 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x14, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x91, 0x01, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0e, 0x70, 0x72, 0x6f, + 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, + 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x6d, + 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x16, 0x50, 0x72, + 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0e, 0x70, 0x72, + 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, + 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x70, 0x72, 0x6f, + 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x6a, 0x0a, 0x17, 0x50, 0x72, + 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x6d, + 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x70, 0x72, 0x6f, + 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x96, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x6f, 0x6d, 0x6f, + 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x17, 0x0a, 0x07, 0x69, 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x03, 0x52, 0x06, 0x69, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, + 0x6d, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x13, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x50, + 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x11, 0x70, 0x72, + 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, + 0x72, 0x0a, 0x16, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x6d, 0x65, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x35, 0x0a, 0x0e, + 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6d, 0x6f, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x69, 0x73, 0x74, 0x22, 0x9e, 0x01, 0x0a, 0x16, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, + 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x79, 0x70, 0x65, 0x22, 0x6a, 0x0a, 0x17, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, + 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x21, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, + 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6d, + 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x28, 0x0a, 0x16, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3c, 0x0a, 0x17, 0x50, 0x72, + 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 0x4b, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x62, 0x0a, 0x1d, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x5f, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x63, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x52, + 0x1a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x50, 0x72, + 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x22, 0x96, 0x01, 0x0a, 0x1c, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x50, 0x72, 0x6f, + 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6d, 0x6f, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8d, 0x01, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x48, 0x0a, 0x0e, 0x70, 0x72, + 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, + 0x4c, 0x69, 0x73, 0x74, 0x22, 0x6c, 0x0a, 0x10, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x17, 0x70, + 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x69, + 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x14, 0x70, 0x72, + 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x4c, 0x69, + 0x73, 0x74, 0x22, 0x63, 0x0a, 0x11, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x61, + 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xe6, 0x03, 0x0a, 0x10, 0x50, 0x72, 0x6f, 0x6d, + 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x0f, + 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, + 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0e, 0x50, 0x72, + 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1a, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, + 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, + 0x6f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, + 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6d, + 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, + 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, + 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x61, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x63, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x50, + 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x63, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, + 0x65, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, + 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x7a, 0x65, 0x6e, 0x69, 0x74, 0x68, 0x2f, 0x44, 0x6f, 0x75, 0x54, 0x6f, + 0x6b, 0x2f, 0x2e, 0x2e, 0x2e, 0x3b, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_promotion_proto_rawDescOnce sync.Once + file_promotion_proto_rawDescData = file_promotion_proto_rawDesc +) + +func file_promotion_proto_rawDescGZIP() []byte { + file_promotion_proto_rawDescOnce.Do(func() { + file_promotion_proto_rawDescData = protoimpl.X.CompressGZIP(file_promotion_proto_rawDescData) + }) + return file_promotion_proto_rawDescData +} + +var file_promotion_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_promotion_proto_goTypes = []interface{}{ + (*Promotion)(nil), // 0: api.Promotion + (*PromotionCreateRequest)(nil), // 1: api.PromotionCreateRequest + (*PromotionCreateResponse)(nil), // 2: api.PromotionCreateResponse + (*PromotionQueryRequest)(nil), // 3: api.PromotionQueryRequest + (*PromotionQueryResponse)(nil), // 4: api.PromotionQueryResponse + (*PromotionUpdateRequest)(nil), // 5: api.PromotionUpdateRequest + (*PromotionUpdateResponse)(nil), // 6: api.PromotionUpdateResponse + (*PromotionDeleteRequest)(nil), // 7: api.PromotionDeleteRequest + (*PromotionDeleteResponse)(nil), // 8: api.PromotionDeleteResponse + (*QuerySpecificPromotionItem)(nil), // 9: api.QuerySpecificPromotionItem + (*QuerySpecificPromotionRequest)(nil), // 10: api.QuerySpecificPromotionRequest + (*QuerySpecificPromotionResult)(nil), // 11: api.QuerySpecificPromotionResult + (*QuerySpecificPromotionResponse)(nil), // 12: api.QuerySpecificPromotionResponse + (*CalculateRequest)(nil), // 13: api.CalculateRequest + (*CalculateResponse)(nil), // 14: api.CalculateResponse + (TradePromotionType)(0), // 15: api.TradePromotionType + (*Metadata)(nil), // 16: api.Metadata +} +var file_promotion_proto_depIdxs = []int32{ + 15, // 0: api.Promotion.promotion_type:type_name -> api.TradePromotionType + 15, // 1: api.PromotionCreateRequest.promotion_type:type_name -> api.TradePromotionType + 16, // 2: api.PromotionCreateResponse.meta:type_name -> api.Metadata + 0, // 3: api.PromotionCreateResponse.promotion:type_name -> api.Promotion + 15, // 4: api.PromotionQueryRequest.promotion_type_list:type_name -> api.TradePromotionType + 16, // 5: api.PromotionQueryResponse.meta:type_name -> api.Metadata + 0, // 6: api.PromotionQueryResponse.promotion_list:type_name -> api.Promotion + 15, // 7: api.PromotionUpdateRequest.promotion_type:type_name -> api.TradePromotionType + 16, // 8: api.PromotionUpdateResponse.meta:type_name -> api.Metadata + 0, // 9: api.PromotionUpdateResponse.promotion:type_name -> api.Promotion + 16, // 10: api.PromotionDeleteResponse.meta:type_name -> api.Metadata + 9, // 11: api.QuerySpecificPromotionRequest.query_specific_promotion_item:type_name -> api.QuerySpecificPromotionItem + 0, // 12: api.QuerySpecificPromotionResult.promotion:type_name -> api.Promotion + 16, // 13: api.QuerySpecificPromotionResponse.meta:type_name -> api.Metadata + 11, // 14: api.QuerySpecificPromotionResponse.promotion_list:type_name -> api.QuerySpecificPromotionResult + 16, // 15: api.CalculateResponse.meta:type_name -> api.Metadata + 1, // 16: api.PromotionService.PromotionCreate:input_type -> api.PromotionCreateRequest + 3, // 17: api.PromotionService.PromotionQuery:input_type -> api.PromotionQueryRequest + 5, // 18: api.PromotionService.PromotionUpdate:input_type -> api.PromotionUpdateRequest + 7, // 19: api.PromotionService.PromotionDelete:input_type -> api.PromotionDeleteRequest + 10, // 20: api.PromotionService.QuerySpecificPromotion:input_type -> api.QuerySpecificPromotionRequest + 13, // 21: api.PromotionService.Calculate:input_type -> api.CalculateRequest + 2, // 22: api.PromotionService.PromotionCreate:output_type -> api.PromotionCreateResponse + 4, // 23: api.PromotionService.PromotionQuery:output_type -> api.PromotionQueryResponse + 6, // 24: api.PromotionService.PromotionUpdate:output_type -> api.PromotionUpdateResponse + 8, // 25: api.PromotionService.PromotionDelete:output_type -> api.PromotionDeleteResponse + 12, // 26: api.PromotionService.QuerySpecificPromotion:output_type -> api.QuerySpecificPromotionResponse + 14, // 27: api.PromotionService.Calculate:output_type -> api.CalculateResponse + 22, // [22:28] is the sub-list for method output_type + 16, // [16:22] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name +} + +func init() { file_promotion_proto_init() } +func file_promotion_proto_init() { + if File_promotion_proto != nil { + return + } + file_base_proto_init() + file_trade_entities_proto_init() + if !protoimpl.UnsafeEnabled { + file_promotion_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Promotion); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_promotion_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PromotionCreateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_promotion_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PromotionCreateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_promotion_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PromotionQueryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_promotion_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PromotionQueryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_promotion_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PromotionUpdateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_promotion_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PromotionUpdateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_promotion_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PromotionDeleteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_promotion_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PromotionDeleteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_promotion_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuerySpecificPromotionItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_promotion_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuerySpecificPromotionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_promotion_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuerySpecificPromotionResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_promotion_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuerySpecificPromotionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_promotion_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CalculateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_promotion_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CalculateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_promotion_proto_rawDesc, + NumEnums: 0, + NumMessages: 15, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_promotion_proto_goTypes, + DependencyIndexes: file_promotion_proto_depIdxs, + MessageInfos: file_promotion_proto_msgTypes, + }.Build() + File_promotion_proto = out.File + file_promotion_proto_rawDesc = nil + file_promotion_proto_goTypes = nil + file_promotion_proto_depIdxs = nil +} diff --git a/backend/baseService/api/promotion.proto b/backend/baseService/api/promotion.proto index 26552a6..226c02e 100644 --- a/backend/baseService/api/promotion.proto +++ b/backend/baseService/api/promotion.proto @@ -12,36 +12,86 @@ service PromotionService { rpc PromotionQuery(PromotionQueryRequest) returns (PromotionQueryResponse); // 查询促销信息 rpc PromotionUpdate(PromotionUpdateRequest) returns (PromotionUpdateResponse); // 更新促销信息 rpc PromotionDelete(PromotionDeleteRequest) returns (PromotionDeleteResponse); // 删除促销信息 + rpc QuerySpecificPromotion(QuerySpecificPromotionRequest) returns (QuerySpecificPromotionResponse); // 查询特定促销信息 + rpc Calculate(CalculateRequest) returns (CalculateResponse); // 计算优惠结果 } -message PromotionCreateRequest { +message Promotion { + int64 id = 1; // 优惠信息id + string name = 2; // 优惠信息名称 + string description = 3; // 优惠信息描述 + TradePromotionType promotion_type = 4; // 优惠信息类型 +} +message PromotionCreateRequest { + string name = 1; // 优惠信息名称 + string description = 2; // 优惠信息描述 + TradePromotionType promotion_type = 3; // 优惠信息类型 } message PromotionCreateResponse { - + api.Metadata meta = 1; + Promotion promotion = 2; } message PromotionQueryRequest { - + repeated int64 id_list = 1; // 优惠信息id列表 + repeated string name_list = 2; // 优惠信息名称列表 + repeated TradePromotionType promotion_type_list = 3; // 优惠信息类型列表 } message PromotionQueryResponse { - + api.Metadata meta = 1; + repeated Promotion promotion_list = 2; } message PromotionUpdateRequest { - + int64 id = 1; // 优惠信息id + string name = 2; // 优惠信息名称 + string description = 3; // 优惠信息描述 + TradePromotionType promotion_type = 4; // 优惠信息类型 } message PromotionUpdateResponse { - + api.Metadata meta = 1; + Promotion promotion = 2; } message PromotionDeleteRequest { - + int64 id = 1; // 优惠信息id } message PromotionDeleteResponse { + api.Metadata meta = 1; +} + +message QuerySpecificPromotionItem { + int64 id = 1; // 优惠信息id + int64 account_id = 2; // 账户id +} + +message QuerySpecificPromotionRequest { + repeated QuerySpecificPromotionItem query_specific_promotion_item = 1; +} + +message QuerySpecificPromotionResult { + int64 id = 1; // 优惠信息id + int64 account_id = 2; // 账户id + int64 entry_id = 3; // 具体优惠id + Promotion promotion = 4; +} + +message QuerySpecificPromotionResponse { + api.Metadata meta = 1; + repeated QuerySpecificPromotionResult promotion_list = 2; +} + +message CalculateRequest { + uint64 total_amount = 1; // 总金额 + repeated int64 promotion_entry_id_list = 2; // 具体优惠信息id列表 +} +message CalculateResponse { + api.Metadata meta = 1; + uint64 calculated_amount = 2; // 计算后的金额 } diff --git a/backend/baseService/api/promotion_grpc.pb.go b/backend/baseService/api/promotion_grpc.pb.go new file mode 100644 index 0000000..ccd68b1 --- /dev/null +++ b/backend/baseService/api/promotion_grpc.pb.go @@ -0,0 +1,283 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v5.27.1 +// source: promotion.proto + +package api + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// PromotionServiceClient is the client API for PromotionService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type PromotionServiceClient interface { + PromotionCreate(ctx context.Context, in *PromotionCreateRequest, opts ...grpc.CallOption) (*PromotionCreateResponse, error) + PromotionQuery(ctx context.Context, in *PromotionQueryRequest, opts ...grpc.CallOption) (*PromotionQueryResponse, error) + PromotionUpdate(ctx context.Context, in *PromotionUpdateRequest, opts ...grpc.CallOption) (*PromotionUpdateResponse, error) + PromotionDelete(ctx context.Context, in *PromotionDeleteRequest, opts ...grpc.CallOption) (*PromotionDeleteResponse, error) + QuerySpecificPromotion(ctx context.Context, in *QuerySpecificPromotionRequest, opts ...grpc.CallOption) (*QuerySpecificPromotionResponse, error) + Calculate(ctx context.Context, in *CalculateRequest, opts ...grpc.CallOption) (*CalculateResponse, error) +} + +type promotionServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewPromotionServiceClient(cc grpc.ClientConnInterface) PromotionServiceClient { + return &promotionServiceClient{cc} +} + +func (c *promotionServiceClient) PromotionCreate(ctx context.Context, in *PromotionCreateRequest, opts ...grpc.CallOption) (*PromotionCreateResponse, error) { + out := new(PromotionCreateResponse) + err := c.cc.Invoke(ctx, "/api.PromotionService/PromotionCreate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *promotionServiceClient) PromotionQuery(ctx context.Context, in *PromotionQueryRequest, opts ...grpc.CallOption) (*PromotionQueryResponse, error) { + out := new(PromotionQueryResponse) + err := c.cc.Invoke(ctx, "/api.PromotionService/PromotionQuery", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *promotionServiceClient) PromotionUpdate(ctx context.Context, in *PromotionUpdateRequest, opts ...grpc.CallOption) (*PromotionUpdateResponse, error) { + out := new(PromotionUpdateResponse) + err := c.cc.Invoke(ctx, "/api.PromotionService/PromotionUpdate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *promotionServiceClient) PromotionDelete(ctx context.Context, in *PromotionDeleteRequest, opts ...grpc.CallOption) (*PromotionDeleteResponse, error) { + out := new(PromotionDeleteResponse) + err := c.cc.Invoke(ctx, "/api.PromotionService/PromotionDelete", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *promotionServiceClient) QuerySpecificPromotion(ctx context.Context, in *QuerySpecificPromotionRequest, opts ...grpc.CallOption) (*QuerySpecificPromotionResponse, error) { + out := new(QuerySpecificPromotionResponse) + err := c.cc.Invoke(ctx, "/api.PromotionService/QuerySpecificPromotion", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *promotionServiceClient) Calculate(ctx context.Context, in *CalculateRequest, opts ...grpc.CallOption) (*CalculateResponse, error) { + out := new(CalculateResponse) + err := c.cc.Invoke(ctx, "/api.PromotionService/Calculate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PromotionServiceServer is the server API for PromotionService service. +// All implementations should embed UnimplementedPromotionServiceServer +// for forward compatibility +type PromotionServiceServer interface { + PromotionCreate(context.Context, *PromotionCreateRequest) (*PromotionCreateResponse, error) + PromotionQuery(context.Context, *PromotionQueryRequest) (*PromotionQueryResponse, error) + PromotionUpdate(context.Context, *PromotionUpdateRequest) (*PromotionUpdateResponse, error) + PromotionDelete(context.Context, *PromotionDeleteRequest) (*PromotionDeleteResponse, error) + QuerySpecificPromotion(context.Context, *QuerySpecificPromotionRequest) (*QuerySpecificPromotionResponse, error) + Calculate(context.Context, *CalculateRequest) (*CalculateResponse, error) +} + +// UnimplementedPromotionServiceServer should be embedded to have forward compatible implementations. +type UnimplementedPromotionServiceServer struct { +} + +func (UnimplementedPromotionServiceServer) PromotionCreate(context.Context, *PromotionCreateRequest) (*PromotionCreateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PromotionCreate not implemented") +} +func (UnimplementedPromotionServiceServer) PromotionQuery(context.Context, *PromotionQueryRequest) (*PromotionQueryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PromotionQuery not implemented") +} +func (UnimplementedPromotionServiceServer) PromotionUpdate(context.Context, *PromotionUpdateRequest) (*PromotionUpdateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PromotionUpdate not implemented") +} +func (UnimplementedPromotionServiceServer) PromotionDelete(context.Context, *PromotionDeleteRequest) (*PromotionDeleteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PromotionDelete not implemented") +} +func (UnimplementedPromotionServiceServer) QuerySpecificPromotion(context.Context, *QuerySpecificPromotionRequest) (*QuerySpecificPromotionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QuerySpecificPromotion not implemented") +} +func (UnimplementedPromotionServiceServer) Calculate(context.Context, *CalculateRequest) (*CalculateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Calculate not implemented") +} + +// UnsafePromotionServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PromotionServiceServer will +// result in compilation errors. +type UnsafePromotionServiceServer interface { + mustEmbedUnimplementedPromotionServiceServer() +} + +func RegisterPromotionServiceServer(s grpc.ServiceRegistrar, srv PromotionServiceServer) { + s.RegisterService(&PromotionService_ServiceDesc, srv) +} + +func _PromotionService_PromotionCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PromotionCreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PromotionServiceServer).PromotionCreate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.PromotionService/PromotionCreate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PromotionServiceServer).PromotionCreate(ctx, req.(*PromotionCreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PromotionService_PromotionQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PromotionQueryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PromotionServiceServer).PromotionQuery(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.PromotionService/PromotionQuery", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PromotionServiceServer).PromotionQuery(ctx, req.(*PromotionQueryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PromotionService_PromotionUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PromotionUpdateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PromotionServiceServer).PromotionUpdate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.PromotionService/PromotionUpdate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PromotionServiceServer).PromotionUpdate(ctx, req.(*PromotionUpdateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PromotionService_PromotionDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PromotionDeleteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PromotionServiceServer).PromotionDelete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.PromotionService/PromotionDelete", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PromotionServiceServer).PromotionDelete(ctx, req.(*PromotionDeleteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PromotionService_QuerySpecificPromotion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySpecificPromotionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PromotionServiceServer).QuerySpecificPromotion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.PromotionService/QuerySpecificPromotion", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PromotionServiceServer).QuerySpecificPromotion(ctx, req.(*QuerySpecificPromotionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PromotionService_Calculate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CalculateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PromotionServiceServer).Calculate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.PromotionService/Calculate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PromotionServiceServer).Calculate(ctx, req.(*CalculateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// PromotionService_ServiceDesc is the grpc.ServiceDesc for PromotionService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PromotionService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.PromotionService", + HandlerType: (*PromotionServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "PromotionCreate", + Handler: _PromotionService_PromotionCreate_Handler, + }, + { + MethodName: "PromotionQuery", + Handler: _PromotionService_PromotionQuery_Handler, + }, + { + MethodName: "PromotionUpdate", + Handler: _PromotionService_PromotionUpdate_Handler, + }, + { + MethodName: "PromotionDelete", + Handler: _PromotionService_PromotionDelete_Handler, + }, + { + MethodName: "QuerySpecificPromotion", + Handler: _PromotionService_QuerySpecificPromotion_Handler, + }, + { + MethodName: "Calculate", + Handler: _PromotionService_Calculate_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "promotion.proto", +} diff --git a/backend/baseService/api/refund.pb.go b/backend/baseService/api/refund.pb.go new file mode 100644 index 0000000..82f48b9 --- /dev/null +++ b/backend/baseService/api/refund.pb.go @@ -0,0 +1,687 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v5.27.1 +// source: refund.proto + +package api + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type RefundCreateType int32 + +const ( + RefundCreateType_ALL RefundCreateType = 0 // 全额退款 + RefundCreateType_PART RefundCreateType = 1 // 部分退款 +) + +// Enum value maps for RefundCreateType. +var ( + RefundCreateType_name = map[int32]string{ + 0: "ALL", + 1: "PART", + } + RefundCreateType_value = map[string]int32{ + "ALL": 0, + "PART": 1, + } +) + +func (x RefundCreateType) Enum() *RefundCreateType { + p := new(RefundCreateType) + *p = x + return p +} + +func (x RefundCreateType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RefundCreateType) Descriptor() protoreflect.EnumDescriptor { + return file_refund_proto_enumTypes[0].Descriptor() +} + +func (RefundCreateType) Type() protoreflect.EnumType { + return &file_refund_proto_enumTypes[0] +} + +func (x RefundCreateType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RefundCreateType.Descriptor instead. +func (RefundCreateType) EnumDescriptor() ([]byte, []int) { + return file_refund_proto_rawDescGZIP(), []int{0} +} + +type RefundCreateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrderId int64 `protobuf:"varint,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` // 交易单id + RefundCreateType RefundCreateType `protobuf:"varint,2,opt,name=refund_create_type,json=refundCreateType,proto3,enum=api.RefundCreateType" json:"refund_create_type,omitempty"` // 创建退款类型 + RefundType RefundOrderType `protobuf:"varint,3,opt,name=refund_type,json=refundType,proto3,enum=api.RefundOrderType" json:"refund_type,omitempty"` // 退款类型 + PaymentId int64 `protobuf:"varint,4,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` // 支付单id + RefundAmount uint64 `protobuf:"varint,5,opt,name=refund_amount,json=refundAmount,proto3" json:"refund_amount,omitempty"` // 退款金额 + RefundReason string `protobuf:"bytes,6,opt,name=refund_reason,json=refundReason,proto3" json:"refund_reason,omitempty"` // 退款原因 +} + +func (x *RefundCreateRequest) Reset() { + *x = RefundCreateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_refund_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RefundCreateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefundCreateRequest) ProtoMessage() {} + +func (x *RefundCreateRequest) ProtoReflect() protoreflect.Message { + mi := &file_refund_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefundCreateRequest.ProtoReflect.Descriptor instead. +func (*RefundCreateRequest) Descriptor() ([]byte, []int) { + return file_refund_proto_rawDescGZIP(), []int{0} +} + +func (x *RefundCreateRequest) GetOrderId() int64 { + if x != nil { + return x.OrderId + } + return 0 +} + +func (x *RefundCreateRequest) GetRefundCreateType() RefundCreateType { + if x != nil { + return x.RefundCreateType + } + return RefundCreateType_ALL +} + +func (x *RefundCreateRequest) GetRefundType() RefundOrderType { + if x != nil { + return x.RefundType + } + return RefundOrderType_UNDEFINED_ROT +} + +func (x *RefundCreateRequest) GetPaymentId() int64 { + if x != nil { + return x.PaymentId + } + return 0 +} + +func (x *RefundCreateRequest) GetRefundAmount() uint64 { + if x != nil { + return x.RefundAmount + } + return 0 +} + +func (x *RefundCreateRequest) GetRefundReason() string { + if x != nil { + return x.RefundReason + } + return "" +} + +type RefundCreateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + RefundOrder *RefundOrder `protobuf:"bytes,2,opt,name=refund_order,json=refundOrder,proto3" json:"refund_order,omitempty"` +} + +func (x *RefundCreateResponse) Reset() { + *x = RefundCreateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_refund_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RefundCreateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefundCreateResponse) ProtoMessage() {} + +func (x *RefundCreateResponse) ProtoReflect() protoreflect.Message { + mi := &file_refund_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefundCreateResponse.ProtoReflect.Descriptor instead. +func (*RefundCreateResponse) Descriptor() ([]byte, []int) { + return file_refund_proto_rawDescGZIP(), []int{1} +} + +func (x *RefundCreateResponse) GetMeta() *Metadata { + if x != nil { + return x.Meta + } + return nil +} + +func (x *RefundCreateResponse) GetRefundOrder() *RefundOrder { + if x != nil { + return x.RefundOrder + } + return nil +} + +type RefundQueryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrderIdList []int64 `protobuf:"varint,1,rep,packed,name=order_id_list,json=orderIdList,proto3" json:"order_id_list,omitempty"` + RefundOrderNoList []string `protobuf:"bytes,2,rep,name=refund_order_no_list,json=refundOrderNoList,proto3" json:"refund_order_no_list,omitempty"` + PaymentIdList []int64 `protobuf:"varint,3,rep,packed,name=payment_id_list,json=paymentIdList,proto3" json:"payment_id_list,omitempty"` +} + +func (x *RefundQueryRequest) Reset() { + *x = RefundQueryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_refund_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RefundQueryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefundQueryRequest) ProtoMessage() {} + +func (x *RefundQueryRequest) ProtoReflect() protoreflect.Message { + mi := &file_refund_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefundQueryRequest.ProtoReflect.Descriptor instead. +func (*RefundQueryRequest) Descriptor() ([]byte, []int) { + return file_refund_proto_rawDescGZIP(), []int{2} +} + +func (x *RefundQueryRequest) GetOrderIdList() []int64 { + if x != nil { + return x.OrderIdList + } + return nil +} + +func (x *RefundQueryRequest) GetRefundOrderNoList() []string { + if x != nil { + return x.RefundOrderNoList + } + return nil +} + +func (x *RefundQueryRequest) GetPaymentIdList() []int64 { + if x != nil { + return x.PaymentIdList + } + return nil +} + +type RefundQueryResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + RefundOrderList []*RefundOrder `protobuf:"bytes,2,rep,name=refund_order_list,json=refundOrderList,proto3" json:"refund_order_list,omitempty"` +} + +func (x *RefundQueryResponse) Reset() { + *x = RefundQueryResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_refund_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RefundQueryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefundQueryResponse) ProtoMessage() {} + +func (x *RefundQueryResponse) ProtoReflect() protoreflect.Message { + mi := &file_refund_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefundQueryResponse.ProtoReflect.Descriptor instead. +func (*RefundQueryResponse) Descriptor() ([]byte, []int) { + return file_refund_proto_rawDescGZIP(), []int{3} +} + +func (x *RefundQueryResponse) GetMeta() *Metadata { + if x != nil { + return x.Meta + } + return nil +} + +func (x *RefundQueryResponse) GetRefundOrderList() []*RefundOrder { + if x != nil { + return x.RefundOrderList + } + return nil +} + +type RefundUpdateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RefundOrderStatus RefundOrderStatus `protobuf:"varint,1,opt,name=refund_order_status,json=refundOrderStatus,proto3,enum=api.RefundOrderStatus" json:"refund_order_status,omitempty"` // 退款单状态 + RefundOrderId int64 `protobuf:"varint,2,opt,name=refund_order_id,json=refundOrderId,proto3" json:"refund_order_id,omitempty"` // 退款单id + RefundReason string `protobuf:"bytes,3,opt,name=refund_reason,json=refundReason,proto3" json:"refund_reason,omitempty"` // 退款原因 +} + +func (x *RefundUpdateRequest) Reset() { + *x = RefundUpdateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_refund_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RefundUpdateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefundUpdateRequest) ProtoMessage() {} + +func (x *RefundUpdateRequest) ProtoReflect() protoreflect.Message { + mi := &file_refund_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefundUpdateRequest.ProtoReflect.Descriptor instead. +func (*RefundUpdateRequest) Descriptor() ([]byte, []int) { + return file_refund_proto_rawDescGZIP(), []int{4} +} + +func (x *RefundUpdateRequest) GetRefundOrderStatus() RefundOrderStatus { + if x != nil { + return x.RefundOrderStatus + } + return RefundOrderStatus_CREATE_ROS +} + +func (x *RefundUpdateRequest) GetRefundOrderId() int64 { + if x != nil { + return x.RefundOrderId + } + return 0 +} + +func (x *RefundUpdateRequest) GetRefundReason() string { + if x != nil { + return x.RefundReason + } + return "" +} + +type RefundUpdateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + RefundOrder *RefundOrder `protobuf:"bytes,2,opt,name=refund_order,json=refundOrder,proto3" json:"refund_order,omitempty"` +} + +func (x *RefundUpdateResponse) Reset() { + *x = RefundUpdateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_refund_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RefundUpdateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefundUpdateResponse) ProtoMessage() {} + +func (x *RefundUpdateResponse) ProtoReflect() protoreflect.Message { + mi := &file_refund_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefundUpdateResponse.ProtoReflect.Descriptor instead. +func (*RefundUpdateResponse) Descriptor() ([]byte, []int) { + return file_refund_proto_rawDescGZIP(), []int{5} +} + +func (x *RefundUpdateResponse) GetMeta() *Metadata { + if x != nil { + return x.Meta + } + return nil +} + +func (x *RefundUpdateResponse) GetRefundOrder() *RefundOrder { + if x != nil { + return x.RefundOrder + } + return nil +} + +var File_refund_proto protoreflect.FileDescriptor + +var file_refund_proto_rawDesc = []byte{ + 0x0a, 0x0c, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, + 0x61, 0x70, 0x69, 0x1a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x14, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x95, 0x02, 0x0a, 0x13, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x43, 0x0a, 0x12, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x5f, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x10, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x72, 0x65, + 0x66, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x41, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x5f, + 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, + 0x66, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x6e, 0x0a, 0x14, 0x52, 0x65, + 0x66, 0x75, 0x6e, 0x64, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x33, 0x0a, 0x0c, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x5f, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x0b, 0x72, + 0x65, 0x66, 0x75, 0x6e, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x91, 0x01, 0x0a, 0x12, 0x52, + 0x65, 0x66, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x5f, 0x6c, 0x69, + 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0b, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, + 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x14, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x5f, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x4e, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x5f, 0x69, 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, + 0x0d, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x76, + 0x0a, 0x13, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x3c, 0x0a, 0x11, 0x72, 0x65, 0x66, 0x75, + 0x6e, 0x64, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x0f, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xaa, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x66, 0x75, 0x6e, + 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, + 0x0a, 0x13, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x11, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, + 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0d, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x23, + 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x22, 0x6e, 0x0a, 0x14, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x6d, + 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x33, + 0x0a, 0x0c, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x66, 0x75, 0x6e, + 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x0b, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x2a, 0x25, 0x0a, 0x10, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x00, + 0x12, 0x08, 0x0a, 0x04, 0x50, 0x41, 0x52, 0x54, 0x10, 0x01, 0x32, 0xdb, 0x01, 0x0a, 0x0d, 0x52, + 0x65, 0x66, 0x75, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x0c, + 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x18, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x66, + 0x75, 0x6e, 0x64, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0c, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x7a, 0x65, 0x6e, 0x69, + 0x74, 0x68, 0x2f, 0x44, 0x6f, 0x75, 0x54, 0x6f, 0x6b, 0x2f, 0x2e, 0x2e, 0x2e, 0x3b, 0x61, 0x70, + 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_refund_proto_rawDescOnce sync.Once + file_refund_proto_rawDescData = file_refund_proto_rawDesc +) + +func file_refund_proto_rawDescGZIP() []byte { + file_refund_proto_rawDescOnce.Do(func() { + file_refund_proto_rawDescData = protoimpl.X.CompressGZIP(file_refund_proto_rawDescData) + }) + return file_refund_proto_rawDescData +} + +var file_refund_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_refund_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_refund_proto_goTypes = []interface{}{ + (RefundCreateType)(0), // 0: api.RefundCreateType + (*RefundCreateRequest)(nil), // 1: api.RefundCreateRequest + (*RefundCreateResponse)(nil), // 2: api.RefundCreateResponse + (*RefundQueryRequest)(nil), // 3: api.RefundQueryRequest + (*RefundQueryResponse)(nil), // 4: api.RefundQueryResponse + (*RefundUpdateRequest)(nil), // 5: api.RefundUpdateRequest + (*RefundUpdateResponse)(nil), // 6: api.RefundUpdateResponse + (RefundOrderType)(0), // 7: api.RefundOrderType + (*Metadata)(nil), // 8: api.Metadata + (*RefundOrder)(nil), // 9: api.RefundOrder + (RefundOrderStatus)(0), // 10: api.RefundOrderStatus +} +var file_refund_proto_depIdxs = []int32{ + 0, // 0: api.RefundCreateRequest.refund_create_type:type_name -> api.RefundCreateType + 7, // 1: api.RefundCreateRequest.refund_type:type_name -> api.RefundOrderType + 8, // 2: api.RefundCreateResponse.meta:type_name -> api.Metadata + 9, // 3: api.RefundCreateResponse.refund_order:type_name -> api.RefundOrder + 8, // 4: api.RefundQueryResponse.meta:type_name -> api.Metadata + 9, // 5: api.RefundQueryResponse.refund_order_list:type_name -> api.RefundOrder + 10, // 6: api.RefundUpdateRequest.refund_order_status:type_name -> api.RefundOrderStatus + 8, // 7: api.RefundUpdateResponse.meta:type_name -> api.Metadata + 9, // 8: api.RefundUpdateResponse.refund_order:type_name -> api.RefundOrder + 1, // 9: api.RefundService.RefundCreate:input_type -> api.RefundCreateRequest + 3, // 10: api.RefundService.RefundQuery:input_type -> api.RefundQueryRequest + 5, // 11: api.RefundService.RefundUpdate:input_type -> api.RefundUpdateRequest + 2, // 12: api.RefundService.RefundCreate:output_type -> api.RefundCreateResponse + 4, // 13: api.RefundService.RefundQuery:output_type -> api.RefundQueryResponse + 6, // 14: api.RefundService.RefundUpdate:output_type -> api.RefundUpdateResponse + 12, // [12:15] is the sub-list for method output_type + 9, // [9:12] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_refund_proto_init() } +func file_refund_proto_init() { + if File_refund_proto != nil { + return + } + file_base_proto_init() + file_trade_entities_proto_init() + if !protoimpl.UnsafeEnabled { + file_refund_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefundCreateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_refund_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefundCreateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_refund_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefundQueryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_refund_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefundQueryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_refund_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefundUpdateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_refund_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefundUpdateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_refund_proto_rawDesc, + NumEnums: 1, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_refund_proto_goTypes, + DependencyIndexes: file_refund_proto_depIdxs, + EnumInfos: file_refund_proto_enumTypes, + MessageInfos: file_refund_proto_msgTypes, + }.Build() + File_refund_proto = out.File + file_refund_proto_rawDesc = nil + file_refund_proto_goTypes = nil + file_refund_proto_depIdxs = nil +} diff --git a/backend/baseService/api/refund.proto b/backend/baseService/api/refund.proto index a559690..a864f22 100644 --- a/backend/baseService/api/refund.proto +++ b/backend/baseService/api/refund.proto @@ -13,26 +13,43 @@ service RefundService { rpc RefundUpdate(RefundUpdateRequest) returns (RefundUpdateResponse); // 更新退款单 } -message RefundCreateRequest { +enum RefundCreateType { + ALL = 0; // 全额退款 + PART = 1; // 部分退款 +} +message RefundCreateRequest { + int64 order_id = 1; // 交易单id + RefundCreateType refund_create_type = 2; // 创建退款类型 + RefundOrderType refund_type = 3; // 退款类型 + int64 payment_id = 4; // 支付单id + uint64 refund_amount = 5; // 退款金额 + string refund_reason = 6; // 退款原因 } message RefundCreateResponse { - + api.Metadata meta = 1; + RefundOrder refund_order = 2; } message RefundQueryRequest { - + repeated int64 order_id_list = 1; + repeated string refund_order_no_list = 2; + repeated int64 payment_id_list = 3; } message RefundQueryResponse { - + api.Metadata meta = 1; + repeated RefundOrder refund_order_list = 2; } message RefundUpdateRequest { - + RefundOrderStatus refund_order_status = 1; // 退款单状态 + int64 refund_order_id = 2; // 退款单id + string refund_reason = 3; // 退款原因 } message RefundUpdateResponse { - + api.Metadata meta = 1; + RefundOrder refund_order = 2; } \ No newline at end of file diff --git a/backend/baseService/api/refund_grpc.pb.go b/backend/baseService/api/refund_grpc.pb.go new file mode 100644 index 0000000..59d8e2d --- /dev/null +++ b/backend/baseService/api/refund_grpc.pb.go @@ -0,0 +1,175 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v5.27.1 +// source: refund.proto + +package api + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// RefundServiceClient is the client API for RefundService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type RefundServiceClient interface { + RefundCreate(ctx context.Context, in *RefundCreateRequest, opts ...grpc.CallOption) (*RefundCreateResponse, error) + RefundQuery(ctx context.Context, in *RefundQueryRequest, opts ...grpc.CallOption) (*RefundQueryResponse, error) + RefundUpdate(ctx context.Context, in *RefundUpdateRequest, opts ...grpc.CallOption) (*RefundUpdateResponse, error) +} + +type refundServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewRefundServiceClient(cc grpc.ClientConnInterface) RefundServiceClient { + return &refundServiceClient{cc} +} + +func (c *refundServiceClient) RefundCreate(ctx context.Context, in *RefundCreateRequest, opts ...grpc.CallOption) (*RefundCreateResponse, error) { + out := new(RefundCreateResponse) + err := c.cc.Invoke(ctx, "/api.RefundService/RefundCreate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *refundServiceClient) RefundQuery(ctx context.Context, in *RefundQueryRequest, opts ...grpc.CallOption) (*RefundQueryResponse, error) { + out := new(RefundQueryResponse) + err := c.cc.Invoke(ctx, "/api.RefundService/RefundQuery", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *refundServiceClient) RefundUpdate(ctx context.Context, in *RefundUpdateRequest, opts ...grpc.CallOption) (*RefundUpdateResponse, error) { + out := new(RefundUpdateResponse) + err := c.cc.Invoke(ctx, "/api.RefundService/RefundUpdate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RefundServiceServer is the server API for RefundService service. +// All implementations should embed UnimplementedRefundServiceServer +// for forward compatibility +type RefundServiceServer interface { + RefundCreate(context.Context, *RefundCreateRequest) (*RefundCreateResponse, error) + RefundQuery(context.Context, *RefundQueryRequest) (*RefundQueryResponse, error) + RefundUpdate(context.Context, *RefundUpdateRequest) (*RefundUpdateResponse, error) +} + +// UnimplementedRefundServiceServer should be embedded to have forward compatible implementations. +type UnimplementedRefundServiceServer struct { +} + +func (UnimplementedRefundServiceServer) RefundCreate(context.Context, *RefundCreateRequest) (*RefundCreateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RefundCreate not implemented") +} +func (UnimplementedRefundServiceServer) RefundQuery(context.Context, *RefundQueryRequest) (*RefundQueryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RefundQuery not implemented") +} +func (UnimplementedRefundServiceServer) RefundUpdate(context.Context, *RefundUpdateRequest) (*RefundUpdateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RefundUpdate not implemented") +} + +// UnsafeRefundServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RefundServiceServer will +// result in compilation errors. +type UnsafeRefundServiceServer interface { + mustEmbedUnimplementedRefundServiceServer() +} + +func RegisterRefundServiceServer(s grpc.ServiceRegistrar, srv RefundServiceServer) { + s.RegisterService(&RefundService_ServiceDesc, srv) +} + +func _RefundService_RefundCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RefundCreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RefundServiceServer).RefundCreate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.RefundService/RefundCreate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RefundServiceServer).RefundCreate(ctx, req.(*RefundCreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RefundService_RefundQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RefundQueryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RefundServiceServer).RefundQuery(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.RefundService/RefundQuery", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RefundServiceServer).RefundQuery(ctx, req.(*RefundQueryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RefundService_RefundUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RefundUpdateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RefundServiceServer).RefundUpdate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.RefundService/RefundUpdate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RefundServiceServer).RefundUpdate(ctx, req.(*RefundUpdateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// RefundService_ServiceDesc is the grpc.ServiceDesc for RefundService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RefundService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.RefundService", + HandlerType: (*RefundServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "RefundCreate", + Handler: _RefundService_RefundCreate_Handler, + }, + { + MethodName: "RefundQuery", + Handler: _RefundService_RefundQuery_Handler, + }, + { + MethodName: "RefundUpdate", + Handler: _RefundService_RefundUpdate_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "refund.proto", +} diff --git a/backend/baseService/api/trade.pb.go b/backend/baseService/api/trade.pb.go new file mode 100644 index 0000000..6a9dcc1 --- /dev/null +++ b/backend/baseService/api/trade.pb.go @@ -0,0 +1,1421 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v5.27.1 +// source: trade.proto + +package api + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type QueryTradeOrderRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrderIdList []int64 `protobuf:"varint,1,rep,packed,name=order_id_list,json=orderIdList,proto3" json:"order_id_list,omitempty"` + BizOrderNoList []string `protobuf:"bytes,2,rep,name=biz_order_no_list,json=bizOrderNoList,proto3" json:"biz_order_no_list,omitempty"` +} + +func (x *QueryTradeOrderRequest) Reset() { + *x = QueryTradeOrderRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_trade_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryTradeOrderRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryTradeOrderRequest) ProtoMessage() {} + +func (x *QueryTradeOrderRequest) ProtoReflect() protoreflect.Message { + mi := &file_trade_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryTradeOrderRequest.ProtoReflect.Descriptor instead. +func (*QueryTradeOrderRequest) Descriptor() ([]byte, []int) { + return file_trade_proto_rawDescGZIP(), []int{0} +} + +func (x *QueryTradeOrderRequest) GetOrderIdList() []int64 { + if x != nil { + return x.OrderIdList + } + return nil +} + +func (x *QueryTradeOrderRequest) GetBizOrderNoList() []string { + if x != nil { + return x.BizOrderNoList + } + return nil +} + +type QueryTradeOrderResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + TradeOrderList []*TradeOrder `protobuf:"bytes,2,rep,name=trade_order_list,json=tradeOrderList,proto3" json:"trade_order_list,omitempty"` +} + +func (x *QueryTradeOrderResponse) Reset() { + *x = QueryTradeOrderResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_trade_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryTradeOrderResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryTradeOrderResponse) ProtoMessage() {} + +func (x *QueryTradeOrderResponse) ProtoReflect() protoreflect.Message { + mi := &file_trade_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryTradeOrderResponse.ProtoReflect.Descriptor instead. +func (*QueryTradeOrderResponse) Descriptor() ([]byte, []int) { + return file_trade_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryTradeOrderResponse) GetMeta() *Metadata { + if x != nil { + return x.Meta + } + return nil +} + +func (x *QueryTradeOrderResponse) GetTradeOrderList() []*TradeOrder { + if x != nil { + return x.TradeOrderList + } + return nil +} + +type TradeCreateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BizType TradeBizType `protobuf:"varint,1,opt,name=biz_type,json=bizType,proto3,enum=api.TradeBizType" json:"biz_type,omitempty"` + SaleWay TradeSaleWay `protobuf:"varint,2,opt,name=sale_way,json=saleWay,proto3,enum=api.TradeSaleWay" json:"sale_way,omitempty"` + PaySequence TradePaySequence `protobuf:"varint,3,opt,name=pay_sequence,json=paySequence,proto3,enum=api.TradePaySequence" json:"pay_sequence,omitempty"` + GoodsType TradeGoodsType `protobuf:"varint,4,opt,name=goods_type,json=goodsType,proto3,enum=api.TradeGoodsType" json:"goods_type,omitempty"` + BizStatus int64 `protobuf:"varint,5,opt,name=biz_status,json=bizStatus,proto3" json:"biz_status,omitempty"` + BizOrderNo string `protobuf:"bytes,6,opt,name=biz_order_no,json=bizOrderNo,proto3" json:"biz_order_no,omitempty"` + BizId int64 `protobuf:"varint,7,opt,name=biz_id,json=bizId,proto3" json:"biz_id,omitempty"` + Buyer *TradeParticipant `protobuf:"bytes,8,opt,name=buyer,proto3" json:"buyer,omitempty"` + Seller *TradeParticipant `protobuf:"bytes,9,opt,name=seller,proto3" json:"seller,omitempty"` + PayType PayType `protobuf:"varint,10,opt,name=pay_type,json=payType,proto3,enum=api.PayType" json:"pay_type,omitempty"` + PayableAmount uint64 `protobuf:"varint,11,opt,name=payable_amount,json=payableAmount,proto3" json:"payable_amount,omitempty"` + Promotions []int64 `protobuf:"varint,12,rep,packed,name=promotions,proto3" json:"promotions,omitempty"` + DeliveryInfo *DeliveryInfo `protobuf:"bytes,13,opt,name=delivery_info,json=deliveryInfo,proto3" json:"delivery_info,omitempty"` + DeliveryTime int64 `protobuf:"varint,14,opt,name=delivery_time,json=deliveryTime,proto3" json:"delivery_time,omitempty"` + TimeoutInfo *TimeoutInfo `protobuf:"bytes,15,opt,name=timeout_info,json=timeoutInfo,proto3" json:"timeout_info,omitempty"` + SubOrderList []*TradeCreateRequest `protobuf:"bytes,16,rep,name=sub_order_list,json=subOrderList,proto3" json:"sub_order_list,omitempty"` + Extra map[string]string `protobuf:"bytes,17,rep,name=extra,proto3" json:"extra,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *TradeCreateRequest) Reset() { + *x = TradeCreateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_trade_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TradeCreateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TradeCreateRequest) ProtoMessage() {} + +func (x *TradeCreateRequest) ProtoReflect() protoreflect.Message { + mi := &file_trade_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TradeCreateRequest.ProtoReflect.Descriptor instead. +func (*TradeCreateRequest) Descriptor() ([]byte, []int) { + return file_trade_proto_rawDescGZIP(), []int{2} +} + +func (x *TradeCreateRequest) GetBizType() TradeBizType { + if x != nil { + return x.BizType + } + return TradeBizType_DEFAULT_BT +} + +func (x *TradeCreateRequest) GetSaleWay() TradeSaleWay { + if x != nil { + return x.SaleWay + } + return TradeSaleWay_DEFAULT_SW +} + +func (x *TradeCreateRequest) GetPaySequence() TradePaySequence { + if x != nil { + return x.PaySequence + } + return TradePaySequence_PAY_FIRST +} + +func (x *TradeCreateRequest) GetGoodsType() TradeGoodsType { + if x != nil { + return x.GoodsType + } + return TradeGoodsType_DEFAULT_GT +} + +func (x *TradeCreateRequest) GetBizStatus() int64 { + if x != nil { + return x.BizStatus + } + return 0 +} + +func (x *TradeCreateRequest) GetBizOrderNo() string { + if x != nil { + return x.BizOrderNo + } + return "" +} + +func (x *TradeCreateRequest) GetBizId() int64 { + if x != nil { + return x.BizId + } + return 0 +} + +func (x *TradeCreateRequest) GetBuyer() *TradeParticipant { + if x != nil { + return x.Buyer + } + return nil +} + +func (x *TradeCreateRequest) GetSeller() *TradeParticipant { + if x != nil { + return x.Seller + } + return nil +} + +func (x *TradeCreateRequest) GetPayType() PayType { + if x != nil { + return x.PayType + } + return PayType_INTERNAL +} + +func (x *TradeCreateRequest) GetPayableAmount() uint64 { + if x != nil { + return x.PayableAmount + } + return 0 +} + +func (x *TradeCreateRequest) GetPromotions() []int64 { + if x != nil { + return x.Promotions + } + return nil +} + +func (x *TradeCreateRequest) GetDeliveryInfo() *DeliveryInfo { + if x != nil { + return x.DeliveryInfo + } + return nil +} + +func (x *TradeCreateRequest) GetDeliveryTime() int64 { + if x != nil { + return x.DeliveryTime + } + return 0 +} + +func (x *TradeCreateRequest) GetTimeoutInfo() *TimeoutInfo { + if x != nil { + return x.TimeoutInfo + } + return nil +} + +func (x *TradeCreateRequest) GetSubOrderList() []*TradeCreateRequest { + if x != nil { + return x.SubOrderList + } + return nil +} + +func (x *TradeCreateRequest) GetExtra() map[string]string { + if x != nil { + return x.Extra + } + return nil +} + +type TradeCreateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + TradeOrder *TradeOrder `protobuf:"bytes,2,opt,name=trade_order,json=tradeOrder,proto3" json:"trade_order,omitempty"` +} + +func (x *TradeCreateResponse) Reset() { + *x = TradeCreateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_trade_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TradeCreateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TradeCreateResponse) ProtoMessage() {} + +func (x *TradeCreateResponse) ProtoReflect() protoreflect.Message { + mi := &file_trade_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TradeCreateResponse.ProtoReflect.Descriptor instead. +func (*TradeCreateResponse) Descriptor() ([]byte, []int) { + return file_trade_proto_rawDescGZIP(), []int{3} +} + +func (x *TradeCreateResponse) GetMeta() *Metadata { + if x != nil { + return x.Meta + } + return nil +} + +func (x *TradeCreateResponse) GetTradeOrder() *TradeOrder { + if x != nil { + return x.TradeOrder + } + return nil +} + +type MergeTradeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OriginalOrderId int64 `protobuf:"varint,1,opt,name=original_order_id,json=originalOrderId,proto3" json:"original_order_id,omitempty"` + OrderIdList []int64 `protobuf:"varint,2,rep,packed,name=order_id_list,json=orderIdList,proto3" json:"order_id_list,omitempty"` +} + +func (x *MergeTradeRequest) Reset() { + *x = MergeTradeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_trade_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MergeTradeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MergeTradeRequest) ProtoMessage() {} + +func (x *MergeTradeRequest) ProtoReflect() protoreflect.Message { + mi := &file_trade_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MergeTradeRequest.ProtoReflect.Descriptor instead. +func (*MergeTradeRequest) Descriptor() ([]byte, []int) { + return file_trade_proto_rawDescGZIP(), []int{4} +} + +func (x *MergeTradeRequest) GetOriginalOrderId() int64 { + if x != nil { + return x.OriginalOrderId + } + return 0 +} + +func (x *MergeTradeRequest) GetOrderIdList() []int64 { + if x != nil { + return x.OrderIdList + } + return nil +} + +type MergeTradeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + TradeOrder *TradeOrder `protobuf:"bytes,2,opt,name=trade_order,json=tradeOrder,proto3" json:"trade_order,omitempty"` +} + +func (x *MergeTradeResponse) Reset() { + *x = MergeTradeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_trade_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MergeTradeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MergeTradeResponse) ProtoMessage() {} + +func (x *MergeTradeResponse) ProtoReflect() protoreflect.Message { + mi := &file_trade_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MergeTradeResponse.ProtoReflect.Descriptor instead. +func (*MergeTradeResponse) Descriptor() ([]byte, []int) { + return file_trade_proto_rawDescGZIP(), []int{5} +} + +func (x *MergeTradeResponse) GetMeta() *Metadata { + if x != nil { + return x.Meta + } + return nil +} + +func (x *MergeTradeResponse) GetTradeOrder() *TradeOrder { + if x != nil { + return x.TradeOrder + } + return nil +} + +type UpdateExtendInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrderId int64 `protobuf:"varint,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` + Extra map[string]string `protobuf:"bytes,2,rep,name=extra,proto3" json:"extra,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *UpdateExtendInfoRequest) Reset() { + *x = UpdateExtendInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_trade_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateExtendInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateExtendInfoRequest) ProtoMessage() {} + +func (x *UpdateExtendInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_trade_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateExtendInfoRequest.ProtoReflect.Descriptor instead. +func (*UpdateExtendInfoRequest) Descriptor() ([]byte, []int) { + return file_trade_proto_rawDescGZIP(), []int{6} +} + +func (x *UpdateExtendInfoRequest) GetOrderId() int64 { + if x != nil { + return x.OrderId + } + return 0 +} + +func (x *UpdateExtendInfoRequest) GetExtra() map[string]string { + if x != nil { + return x.Extra + } + return nil +} + +type UpdateExtendInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + TradeOrder *TradeOrder `protobuf:"bytes,2,opt,name=trade_order,json=tradeOrder,proto3" json:"trade_order,omitempty"` +} + +func (x *UpdateExtendInfoResponse) Reset() { + *x = UpdateExtendInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_trade_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateExtendInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateExtendInfoResponse) ProtoMessage() {} + +func (x *UpdateExtendInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_trade_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateExtendInfoResponse.ProtoReflect.Descriptor instead. +func (*UpdateExtendInfoResponse) Descriptor() ([]byte, []int) { + return file_trade_proto_rawDescGZIP(), []int{7} +} + +func (x *UpdateExtendInfoResponse) GetMeta() *Metadata { + if x != nil { + return x.Meta + } + return nil +} + +func (x *UpdateExtendInfoResponse) GetTradeOrder() *TradeOrder { + if x != nil { + return x.TradeOrder + } + return nil +} + +type UpdateTradeOrderStatusRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrderId int64 `protobuf:"varint,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` + OrderStatus TradeOrderStatusEnum `protobuf:"varint,2,opt,name=order_status,json=orderStatus,proto3,enum=api.TradeOrderStatusEnum" json:"order_status,omitempty"` + CloseType CloseType `protobuf:"varint,3,opt,name=close_type,json=closeType,proto3,enum=api.CloseType" json:"close_type,omitempty"` + CloseReason string `protobuf:"bytes,4,opt,name=close_reason,json=closeReason,proto3" json:"close_reason,omitempty"` +} + +func (x *UpdateTradeOrderStatusRequest) Reset() { + *x = UpdateTradeOrderStatusRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_trade_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateTradeOrderStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateTradeOrderStatusRequest) ProtoMessage() {} + +func (x *UpdateTradeOrderStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_trade_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateTradeOrderStatusRequest.ProtoReflect.Descriptor instead. +func (*UpdateTradeOrderStatusRequest) Descriptor() ([]byte, []int) { + return file_trade_proto_rawDescGZIP(), []int{8} +} + +func (x *UpdateTradeOrderStatusRequest) GetOrderId() int64 { + if x != nil { + return x.OrderId + } + return 0 +} + +func (x *UpdateTradeOrderStatusRequest) GetOrderStatus() TradeOrderStatusEnum { + if x != nil { + return x.OrderStatus + } + return TradeOrderStatusEnum_CREATE +} + +func (x *UpdateTradeOrderStatusRequest) GetCloseType() CloseType { + if x != nil { + return x.CloseType + } + return CloseType_UNDEFINED_CT +} + +func (x *UpdateTradeOrderStatusRequest) GetCloseReason() string { + if x != nil { + return x.CloseReason + } + return "" +} + +type UpdateTradeOrderStatusResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + TradeOrder *TradeOrder `protobuf:"bytes,2,opt,name=trade_order,json=tradeOrder,proto3" json:"trade_order,omitempty"` +} + +func (x *UpdateTradeOrderStatusResponse) Reset() { + *x = UpdateTradeOrderStatusResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_trade_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateTradeOrderStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateTradeOrderStatusResponse) ProtoMessage() {} + +func (x *UpdateTradeOrderStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_trade_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateTradeOrderStatusResponse.ProtoReflect.Descriptor instead. +func (*UpdateTradeOrderStatusResponse) Descriptor() ([]byte, []int) { + return file_trade_proto_rawDescGZIP(), []int{9} +} + +func (x *UpdateTradeOrderStatusResponse) GetMeta() *Metadata { + if x != nil { + return x.Meta + } + return nil +} + +func (x *UpdateTradeOrderStatusResponse) GetTradeOrder() *TradeOrder { + if x != nil { + return x.TradeOrder + } + return nil +} + +type UpdateDeliveryInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrderId int64 `protobuf:"varint,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` + DeliveryInfo *DeliveryInfo `protobuf:"bytes,2,opt,name=delivery_info,json=deliveryInfo,proto3" json:"delivery_info,omitempty"` +} + +func (x *UpdateDeliveryInfoRequest) Reset() { + *x = UpdateDeliveryInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_trade_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateDeliveryInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateDeliveryInfoRequest) ProtoMessage() {} + +func (x *UpdateDeliveryInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_trade_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateDeliveryInfoRequest.ProtoReflect.Descriptor instead. +func (*UpdateDeliveryInfoRequest) Descriptor() ([]byte, []int) { + return file_trade_proto_rawDescGZIP(), []int{10} +} + +func (x *UpdateDeliveryInfoRequest) GetOrderId() int64 { + if x != nil { + return x.OrderId + } + return 0 +} + +func (x *UpdateDeliveryInfoRequest) GetDeliveryInfo() *DeliveryInfo { + if x != nil { + return x.DeliveryInfo + } + return nil +} + +type UpdateDeliveryInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + TradeOrder *TradeOrder `protobuf:"bytes,2,opt,name=trade_order,json=tradeOrder,proto3" json:"trade_order,omitempty"` +} + +func (x *UpdateDeliveryInfoResponse) Reset() { + *x = UpdateDeliveryInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_trade_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateDeliveryInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateDeliveryInfoResponse) ProtoMessage() {} + +func (x *UpdateDeliveryInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_trade_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateDeliveryInfoResponse.ProtoReflect.Descriptor instead. +func (*UpdateDeliveryInfoResponse) Descriptor() ([]byte, []int) { + return file_trade_proto_rawDescGZIP(), []int{11} +} + +func (x *UpdateDeliveryInfoResponse) GetMeta() *Metadata { + if x != nil { + return x.Meta + } + return nil +} + +func (x *UpdateDeliveryInfoResponse) GetTradeOrder() *TradeOrder { + if x != nil { + return x.TradeOrder + } + return nil +} + +type AddSubOrderRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrderId int64 `protobuf:"varint,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` + SubOrder []*TradeCreateRequest `protobuf:"bytes,2,rep,name=sub_order,json=subOrder,proto3" json:"sub_order,omitempty"` +} + +func (x *AddSubOrderRequest) Reset() { + *x = AddSubOrderRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_trade_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddSubOrderRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddSubOrderRequest) ProtoMessage() {} + +func (x *AddSubOrderRequest) ProtoReflect() protoreflect.Message { + mi := &file_trade_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddSubOrderRequest.ProtoReflect.Descriptor instead. +func (*AddSubOrderRequest) Descriptor() ([]byte, []int) { + return file_trade_proto_rawDescGZIP(), []int{12} +} + +func (x *AddSubOrderRequest) GetOrderId() int64 { + if x != nil { + return x.OrderId + } + return 0 +} + +func (x *AddSubOrderRequest) GetSubOrder() []*TradeCreateRequest { + if x != nil { + return x.SubOrder + } + return nil +} + +type AddSubOrderResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + TradeOrder *TradeOrder `protobuf:"bytes,2,opt,name=trade_order,json=tradeOrder,proto3" json:"trade_order,omitempty"` +} + +func (x *AddSubOrderResponse) Reset() { + *x = AddSubOrderResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_trade_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddSubOrderResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddSubOrderResponse) ProtoMessage() {} + +func (x *AddSubOrderResponse) ProtoReflect() protoreflect.Message { + mi := &file_trade_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddSubOrderResponse.ProtoReflect.Descriptor instead. +func (*AddSubOrderResponse) Descriptor() ([]byte, []int) { + return file_trade_proto_rawDescGZIP(), []int{13} +} + +func (x *AddSubOrderResponse) GetMeta() *Metadata { + if x != nil { + return x.Meta + } + return nil +} + +func (x *AddSubOrderResponse) GetTradeOrder() *TradeOrder { + if x != nil { + return x.TradeOrder + } + return nil +} + +var File_trade_proto protoreflect.FileDescriptor + +var file_trade_proto_rawDesc = []byte{ + 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, + 0x70, 0x69, 0x1a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, + 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x67, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x03, 0x52, 0x0b, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x29, 0x0a, 0x11, 0x62, 0x69, 0x7a, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x5f, + 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x62, 0x69, 0x7a, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x77, 0x0a, 0x17, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x64, + 0x65, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4c, + 0x69, 0x73, 0x74, 0x22, 0xc7, 0x06, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x64, 0x65, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x08, 0x62, 0x69, + 0x7a, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x42, 0x69, 0x7a, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x07, 0x62, 0x69, 0x7a, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x73, 0x61, 0x6c, 0x65, + 0x5f, 0x77, 0x61, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x57, 0x61, 0x79, 0x52, 0x07, 0x73, + 0x61, 0x6c, 0x65, 0x57, 0x61, 0x79, 0x12, 0x38, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x5f, 0x73, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x50, 0x61, 0x79, 0x53, 0x65, 0x71, 0x75, 0x65, + 0x6e, 0x63, 0x65, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, + 0x12, 0x32, 0x0a, 0x0a, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, + 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x67, 0x6f, 0x6f, 0x64, 0x73, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x69, 0x7a, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x69, 0x7a, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x20, 0x0a, 0x0c, 0x62, 0x69, 0x7a, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x5f, 0x6e, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x69, 0x7a, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x69, 0x7a, 0x5f, 0x69, 0x64, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x62, 0x69, 0x7a, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x05, + 0x62, 0x75, 0x79, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, + 0x6e, 0x74, 0x52, 0x05, 0x62, 0x75, 0x79, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x06, 0x73, 0x65, 0x6c, + 0x6c, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x54, 0x72, 0x61, 0x64, 0x65, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, + 0x52, 0x06, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x08, 0x70, 0x61, 0x79, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x50, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x70, 0x61, 0x79, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x61, 0x62, + 0x6c, 0x65, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6d, + 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0a, 0x70, 0x72, + 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x36, 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x69, + 0x76, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x0c, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, + 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x74, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0e, 0x73, 0x75, + 0x62, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x10, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0c, 0x73, 0x75, 0x62, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x05, 0x65, 0x78, 0x74, + 0x72, 0x61, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, + 0x72, 0x61, 0x64, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x65, 0x78, + 0x74, 0x72, 0x61, 0x1a, 0x38, 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x6a, 0x0a, + 0x13, 0x54, 0x72, 0x61, 0x64, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x64, 0x65, + 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x0a, 0x74, + 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x63, 0x0a, 0x11, 0x4d, 0x65, 0x72, + 0x67, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, + 0x0a, 0x11, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x61, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x03, 0x52, 0x0b, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x69, + 0x0a, 0x12, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x64, 0x65, + 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x0a, 0x74, + 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0xad, 0x01, 0x0a, 0x17, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x3d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x78, + 0x74, 0x72, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x1a, + 0x38, 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x6f, 0x0a, 0x18, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x64, + 0x65, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x0a, + 0x74, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0xca, 0x01, 0x0a, 0x1d, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0c, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0b, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x73, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x72, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x6f, 0x73, + 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x75, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x6d, 0x65, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x0b, + 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x6e, + 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, + 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x0c, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x71, + 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x04, + 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, + 0x30, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x22, 0x65, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x53, 0x75, 0x62, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x34, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, + 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x08, + 0x73, 0x75, 0x62, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x6a, 0x0a, 0x13, 0x41, 0x64, 0x64, 0x53, + 0x75, 0x62, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x21, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, + 0x74, 0x61, 0x12, 0x30, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, + 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x64, 0x65, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x32, 0xaa, 0x04, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x64, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x72, + 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x64, 0x65, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x54, 0x72, + 0x61, 0x64, 0x65, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x54, + 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, + 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x64, + 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x6c, 0x69, 0x76, + 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x6c, 0x69, 0x76, + 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x40, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x53, 0x75, 0x62, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x17, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x75, 0x62, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, + 0x64, 0x53, 0x75, 0x62, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x7a, 0x65, 0x6e, 0x69, 0x74, 0x68, 0x2f, 0x44, 0x6f, 0x75, 0x54, + 0x6f, 0x6b, 0x2f, 0x2e, 0x2e, 0x2e, 0x3b, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_trade_proto_rawDescOnce sync.Once + file_trade_proto_rawDescData = file_trade_proto_rawDesc +) + +func file_trade_proto_rawDescGZIP() []byte { + file_trade_proto_rawDescOnce.Do(func() { + file_trade_proto_rawDescData = protoimpl.X.CompressGZIP(file_trade_proto_rawDescData) + }) + return file_trade_proto_rawDescData +} + +var file_trade_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_trade_proto_goTypes = []interface{}{ + (*QueryTradeOrderRequest)(nil), // 0: api.QueryTradeOrderRequest + (*QueryTradeOrderResponse)(nil), // 1: api.QueryTradeOrderResponse + (*TradeCreateRequest)(nil), // 2: api.TradeCreateRequest + (*TradeCreateResponse)(nil), // 3: api.TradeCreateResponse + (*MergeTradeRequest)(nil), // 4: api.MergeTradeRequest + (*MergeTradeResponse)(nil), // 5: api.MergeTradeResponse + (*UpdateExtendInfoRequest)(nil), // 6: api.UpdateExtendInfoRequest + (*UpdateExtendInfoResponse)(nil), // 7: api.UpdateExtendInfoResponse + (*UpdateTradeOrderStatusRequest)(nil), // 8: api.UpdateTradeOrderStatusRequest + (*UpdateTradeOrderStatusResponse)(nil), // 9: api.UpdateTradeOrderStatusResponse + (*UpdateDeliveryInfoRequest)(nil), // 10: api.UpdateDeliveryInfoRequest + (*UpdateDeliveryInfoResponse)(nil), // 11: api.UpdateDeliveryInfoResponse + (*AddSubOrderRequest)(nil), // 12: api.AddSubOrderRequest + (*AddSubOrderResponse)(nil), // 13: api.AddSubOrderResponse + nil, // 14: api.TradeCreateRequest.ExtraEntry + nil, // 15: api.UpdateExtendInfoRequest.ExtraEntry + (*Metadata)(nil), // 16: api.Metadata + (*TradeOrder)(nil), // 17: api.TradeOrder + (TradeBizType)(0), // 18: api.TradeBizType + (TradeSaleWay)(0), // 19: api.TradeSaleWay + (TradePaySequence)(0), // 20: api.TradePaySequence + (TradeGoodsType)(0), // 21: api.TradeGoodsType + (*TradeParticipant)(nil), // 22: api.TradeParticipant + (PayType)(0), // 23: api.PayType + (*DeliveryInfo)(nil), // 24: api.DeliveryInfo + (*TimeoutInfo)(nil), // 25: api.TimeoutInfo + (TradeOrderStatusEnum)(0), // 26: api.TradeOrderStatusEnum + (CloseType)(0), // 27: api.CloseType +} +var file_trade_proto_depIdxs = []int32{ + 16, // 0: api.QueryTradeOrderResponse.meta:type_name -> api.Metadata + 17, // 1: api.QueryTradeOrderResponse.trade_order_list:type_name -> api.TradeOrder + 18, // 2: api.TradeCreateRequest.biz_type:type_name -> api.TradeBizType + 19, // 3: api.TradeCreateRequest.sale_way:type_name -> api.TradeSaleWay + 20, // 4: api.TradeCreateRequest.pay_sequence:type_name -> api.TradePaySequence + 21, // 5: api.TradeCreateRequest.goods_type:type_name -> api.TradeGoodsType + 22, // 6: api.TradeCreateRequest.buyer:type_name -> api.TradeParticipant + 22, // 7: api.TradeCreateRequest.seller:type_name -> api.TradeParticipant + 23, // 8: api.TradeCreateRequest.pay_type:type_name -> api.PayType + 24, // 9: api.TradeCreateRequest.delivery_info:type_name -> api.DeliveryInfo + 25, // 10: api.TradeCreateRequest.timeout_info:type_name -> api.TimeoutInfo + 2, // 11: api.TradeCreateRequest.sub_order_list:type_name -> api.TradeCreateRequest + 14, // 12: api.TradeCreateRequest.extra:type_name -> api.TradeCreateRequest.ExtraEntry + 16, // 13: api.TradeCreateResponse.meta:type_name -> api.Metadata + 17, // 14: api.TradeCreateResponse.trade_order:type_name -> api.TradeOrder + 16, // 15: api.MergeTradeResponse.meta:type_name -> api.Metadata + 17, // 16: api.MergeTradeResponse.trade_order:type_name -> api.TradeOrder + 15, // 17: api.UpdateExtendInfoRequest.extra:type_name -> api.UpdateExtendInfoRequest.ExtraEntry + 16, // 18: api.UpdateExtendInfoResponse.meta:type_name -> api.Metadata + 17, // 19: api.UpdateExtendInfoResponse.trade_order:type_name -> api.TradeOrder + 26, // 20: api.UpdateTradeOrderStatusRequest.order_status:type_name -> api.TradeOrderStatusEnum + 27, // 21: api.UpdateTradeOrderStatusRequest.close_type:type_name -> api.CloseType + 16, // 22: api.UpdateTradeOrderStatusResponse.meta:type_name -> api.Metadata + 17, // 23: api.UpdateTradeOrderStatusResponse.trade_order:type_name -> api.TradeOrder + 24, // 24: api.UpdateDeliveryInfoRequest.delivery_info:type_name -> api.DeliveryInfo + 16, // 25: api.UpdateDeliveryInfoResponse.meta:type_name -> api.Metadata + 17, // 26: api.UpdateDeliveryInfoResponse.trade_order:type_name -> api.TradeOrder + 2, // 27: api.AddSubOrderRequest.sub_order:type_name -> api.TradeCreateRequest + 16, // 28: api.AddSubOrderResponse.meta:type_name -> api.Metadata + 17, // 29: api.AddSubOrderResponse.trade_order:type_name -> api.TradeOrder + 0, // 30: api.TradeService.QueryTradeOrder:input_type -> api.QueryTradeOrderRequest + 2, // 31: api.TradeService.TradeCreate:input_type -> api.TradeCreateRequest + 4, // 32: api.TradeService.MergeTrade:input_type -> api.MergeTradeRequest + 6, // 33: api.TradeService.UpdateExtendInfo:input_type -> api.UpdateExtendInfoRequest + 8, // 34: api.TradeService.UpdateTradeOrderStatus:input_type -> api.UpdateTradeOrderStatusRequest + 10, // 35: api.TradeService.UpdateDeliveryInfo:input_type -> api.UpdateDeliveryInfoRequest + 12, // 36: api.TradeService.AddSubOrder:input_type -> api.AddSubOrderRequest + 1, // 37: api.TradeService.QueryTradeOrder:output_type -> api.QueryTradeOrderResponse + 3, // 38: api.TradeService.TradeCreate:output_type -> api.TradeCreateResponse + 5, // 39: api.TradeService.MergeTrade:output_type -> api.MergeTradeResponse + 7, // 40: api.TradeService.UpdateExtendInfo:output_type -> api.UpdateExtendInfoResponse + 9, // 41: api.TradeService.UpdateTradeOrderStatus:output_type -> api.UpdateTradeOrderStatusResponse + 11, // 42: api.TradeService.UpdateDeliveryInfo:output_type -> api.UpdateDeliveryInfoResponse + 13, // 43: api.TradeService.AddSubOrder:output_type -> api.AddSubOrderResponse + 37, // [37:44] is the sub-list for method output_type + 30, // [30:37] is the sub-list for method input_type + 30, // [30:30] is the sub-list for extension type_name + 30, // [30:30] is the sub-list for extension extendee + 0, // [0:30] is the sub-list for field type_name +} + +func init() { file_trade_proto_init() } +func file_trade_proto_init() { + if File_trade_proto != nil { + return + } + file_base_proto_init() + file_trade_entities_proto_init() + if !protoimpl.UnsafeEnabled { + file_trade_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryTradeOrderRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_trade_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryTradeOrderResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_trade_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TradeCreateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_trade_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TradeCreateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_trade_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MergeTradeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_trade_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MergeTradeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_trade_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateExtendInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_trade_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateExtendInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_trade_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateTradeOrderStatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_trade_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateTradeOrderStatusResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_trade_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateDeliveryInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_trade_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateDeliveryInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_trade_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddSubOrderRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_trade_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddSubOrderResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_trade_proto_rawDesc, + NumEnums: 0, + NumMessages: 16, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_trade_proto_goTypes, + DependencyIndexes: file_trade_proto_depIdxs, + MessageInfos: file_trade_proto_msgTypes, + }.Build() + File_trade_proto = out.File + file_trade_proto_rawDesc = nil + file_trade_proto_goTypes = nil + file_trade_proto_depIdxs = nil +} diff --git a/backend/baseService/api/trade.proto b/backend/baseService/api/trade.proto index 8d94805..4c80892 100644 --- a/backend/baseService/api/trade.proto +++ b/backend/baseService/api/trade.proto @@ -8,85 +8,98 @@ import "trade_entities.proto"; import "buf/validate/validate.proto"; service TradeService { - rpc QueryTradeOrder(QueryTradeOrderRequest) returns (QueryTradeOrderResponse); // 查询交易单 - rpc TradeCreate(TradeCreateRequest) returns (TradeCreateResponse); // 创建交易单 - rpc MergeTrade(MergeTradeRequest) returns (MergeTradeResponse); // 合并交易单 - rpc MultiTradeCreate(MultiTradeCreateRequest) returns (MultiTradeCreateResponse); // 批量创建交易单 - rpc UpdateExtendInfo(UpdateExtendInfoRequest) returns (UpdateExtendInfoResponse); // 更新交易单扩展信息 - rpc UpdateTradeOrderStatus(UpdateTradeOrderStatusRequest) returns (UpdateTradeOrderStatusResponse); // 更新交易单状态 - rpc ModifyOrderPrice(ModifyOrderPriceRequest) returns (ModifyOrderPriceResponse); // 修改订单价格 - rpc UpdateDeliveryInfo(UpdateDeliveryInfoRequest) returns (UpdateDeliveryInfoResponse); // 更新交付信息 - rpc AddSubOrder(AddSubOrderRequest) returns (AddSubOrderResponse); // 添加子订单 + rpc QueryTradeOrder(QueryTradeOrderRequest) returns (QueryTradeOrderResponse); // 查询交易单 + rpc TradeCreate(TradeCreateRequest) returns (TradeCreateResponse); // 创建交易单 + rpc MergeTrade(MergeTradeRequest) returns (MergeTradeResponse); // 合并交易单 + rpc UpdateExtendInfo(UpdateExtendInfoRequest) returns (UpdateExtendInfoResponse); // 更新交易单扩展信息 + rpc UpdateTradeOrderStatus(UpdateTradeOrderStatusRequest) returns (UpdateTradeOrderStatusResponse); // 更新交易单状态 + rpc UpdateDeliveryInfo(UpdateDeliveryInfoRequest) returns (UpdateDeliveryInfoResponse); // 更新交付信息 + rpc AddSubOrder(AddSubOrderRequest) returns (AddSubOrderResponse); // 添加子订单 } message QueryTradeOrderRequest { - + repeated int64 order_id_list = 1; + repeated string biz_order_no_list = 2; } message QueryTradeOrderResponse { - + api.Metadata meta = 1; + repeated TradeOrder trade_order_list = 2; } message TradeCreateRequest { - + TradeBizType biz_type = 1; + TradeSaleWay sale_way = 2; + TradePaySequence pay_sequence = 3; + TradeGoodsType goods_type = 4; + int64 biz_status = 5; + string biz_order_no = 6; + int64 biz_id = 7; + TradeParticipant buyer = 8; + TradeParticipant seller = 9; + PayType pay_type = 10; + uint64 payable_amount = 11; + repeated int64 promotions = 12; + DeliveryInfo delivery_info = 13; + int64 delivery_time = 14; + TimeoutInfo timeout_info = 15; + repeated TradeCreateRequest sub_order_list = 16; + map extra = 17; } message TradeCreateResponse { - + api.Metadata meta = 1; + TradeOrder trade_order = 2; } message MergeTradeRequest { - + int64 original_order_id = 1; + repeated int64 order_id_list = 2; } message MergeTradeResponse { - -} - -message MultiTradeCreateRequest { - -} - -message MultiTradeCreateResponse { - + api.Metadata meta = 1; + TradeOrder trade_order = 2; } message UpdateExtendInfoRequest { - + int64 order_id = 1; + map extra = 2; } message UpdateExtendInfoResponse { - + api.Metadata meta = 1; + TradeOrder trade_order = 2; } message UpdateTradeOrderStatusRequest { - + int64 order_id = 1; + TradeOrderStatusEnum order_status = 2; + CloseType close_type = 3; + string close_reason = 4; } message UpdateTradeOrderStatusResponse { - -} - -message ModifyOrderPriceRequest { - -} - -message ModifyOrderPriceResponse { - + api.Metadata meta = 1; + TradeOrder trade_order = 2; } message UpdateDeliveryInfoRequest { - + int64 order_id = 1; + DeliveryInfo delivery_info = 2; } message UpdateDeliveryInfoResponse { - + api.Metadata meta = 1; + TradeOrder trade_order = 2; } message AddSubOrderRequest { - + int64 order_id = 1; + repeated TradeCreateRequest sub_order = 2; } message AddSubOrderResponse { - + api.Metadata meta = 1; + TradeOrder trade_order = 2; } diff --git a/backend/baseService/api/trade_entities.pb.go b/backend/baseService/api/trade_entities.pb.go new file mode 100644 index 0000000..f491bbe --- /dev/null +++ b/backend/baseService/api/trade_entities.pb.go @@ -0,0 +1,2247 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v5.27.1 +// source: trade_entities.proto + +package api + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// 交易单交易类型枚举 表明该笔交易完成了一个怎样的操作 +type TradeBizType int32 + +const ( + TradeBizType_DEFAULT_BT TradeBizType = 0 // 默认值 + TradeBizType_RECHARGE_BT TradeBizType = 1 // DouTok币充值 + TradeBizType_MALL_ORDERS_BT TradeBizType = 2 // 商城订单 +) + +// Enum value maps for TradeBizType. +var ( + TradeBizType_name = map[int32]string{ + 0: "DEFAULT_BT", + 1: "RECHARGE_BT", + 2: "MALL_ORDERS_BT", + } + TradeBizType_value = map[string]int32{ + "DEFAULT_BT": 0, + "RECHARGE_BT": 1, + "MALL_ORDERS_BT": 2, + } +) + +func (x TradeBizType) Enum() *TradeBizType { + p := new(TradeBizType) + *p = x + return p +} + +func (x TradeBizType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TradeBizType) Descriptor() protoreflect.EnumDescriptor { + return file_trade_entities_proto_enumTypes[0].Descriptor() +} + +func (TradeBizType) Type() protoreflect.EnumType { + return &file_trade_entities_proto_enumTypes[0] +} + +func (x TradeBizType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TradeBizType.Descriptor instead. +func (TradeBizType) EnumDescriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{0} +} + +// 销售方式 +type TradeSaleWay int32 + +const ( + TradeSaleWay_DEFAULT_SW TradeSaleWay = 0 // 默认值 + TradeSaleWay_DIRECT_SW TradeSaleWay = 1 // 直接销售 + TradeSaleWay_ADAPTED_SW TradeSaleWay = 2 // 代理销售 +) + +// Enum value maps for TradeSaleWay. +var ( + TradeSaleWay_name = map[int32]string{ + 0: "DEFAULT_SW", + 1: "DIRECT_SW", + 2: "ADAPTED_SW", + } + TradeSaleWay_value = map[string]int32{ + "DEFAULT_SW": 0, + "DIRECT_SW": 1, + "ADAPTED_SW": 2, + } +) + +func (x TradeSaleWay) Enum() *TradeSaleWay { + p := new(TradeSaleWay) + *p = x + return p +} + +func (x TradeSaleWay) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TradeSaleWay) Descriptor() protoreflect.EnumDescriptor { + return file_trade_entities_proto_enumTypes[1].Descriptor() +} + +func (TradeSaleWay) Type() protoreflect.EnumType { + return &file_trade_entities_proto_enumTypes[1] +} + +func (x TradeSaleWay) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TradeSaleWay.Descriptor instead. +func (TradeSaleWay) EnumDescriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{1} +} + +// 支付顺序 +type TradePaySequence int32 + +const ( + TradePaySequence_PAY_FIRST TradePaySequence = 0 // 先支付 + TradePaySequence_PAY_LAST TradePaySequence = 1 // 后支付 +) + +// Enum value maps for TradePaySequence. +var ( + TradePaySequence_name = map[int32]string{ + 0: "PAY_FIRST", + 1: "PAY_LAST", + } + TradePaySequence_value = map[string]int32{ + "PAY_FIRST": 0, + "PAY_LAST": 1, + } +) + +func (x TradePaySequence) Enum() *TradePaySequence { + p := new(TradePaySequence) + *p = x + return p +} + +func (x TradePaySequence) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TradePaySequence) Descriptor() protoreflect.EnumDescriptor { + return file_trade_entities_proto_enumTypes[2].Descriptor() +} + +func (TradePaySequence) Type() protoreflect.EnumType { + return &file_trade_entities_proto_enumTypes[2] +} + +func (x TradePaySequence) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TradePaySequence.Descriptor instead. +func (TradePaySequence) EnumDescriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{2} +} + +// 交易对象的商品类型 +type TradeGoodsType int32 + +const ( + TradeGoodsType_DEFAULT_GT TradeGoodsType = 0 // 默认值 + TradeGoodsType_NORMAL_GT TradeGoodsType = 1 // 普通商品 + TradeGoodsType_VIRTUAL_GT TradeGoodsType = 2 // 虚拟商品 + TradeGoodsType_COUPON_GT TradeGoodsType = 3 // 优惠券 +) + +// Enum value maps for TradeGoodsType. +var ( + TradeGoodsType_name = map[int32]string{ + 0: "DEFAULT_GT", + 1: "NORMAL_GT", + 2: "VIRTUAL_GT", + 3: "COUPON_GT", + } + TradeGoodsType_value = map[string]int32{ + "DEFAULT_GT": 0, + "NORMAL_GT": 1, + "VIRTUAL_GT": 2, + "COUPON_GT": 3, + } +) + +func (x TradeGoodsType) Enum() *TradeGoodsType { + p := new(TradeGoodsType) + *p = x + return p +} + +func (x TradeGoodsType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TradeGoodsType) Descriptor() protoreflect.EnumDescriptor { + return file_trade_entities_proto_enumTypes[3].Descriptor() +} + +func (TradeGoodsType) Type() protoreflect.EnumType { + return &file_trade_entities_proto_enumTypes[3] +} + +func (x TradeGoodsType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TradeGoodsType.Descriptor instead. +func (TradeGoodsType) EnumDescriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{3} +} + +type TradeOrderStatusEnum int32 + +const ( + TradeOrderStatusEnum_CREATE TradeOrderStatusEnum = 0 // 已创建 + TradeOrderStatusEnum_PAY TradeOrderStatusEnum = 1 // 已支付 + TradeOrderStatusEnum_DELIVERY_STARTED TradeOrderStatusEnum = 2 // 开始交付 + TradeOrderStatusEnum_DELIVERY_FINISHED TradeOrderStatusEnum = 3 // 交付完成 + TradeOrderStatusEnum_CLOSED TradeOrderStatusEnum = 4 // 已关闭 + TradeOrderStatusEnum_SUCCESS TradeOrderStatusEnum = 5 // 交易成功 + TradeOrderStatusEnum_FAIL TradeOrderStatusEnum = 6 // 交易失败 + TradeOrderStatusEnum_EVALUATED TradeOrderStatusEnum = 7 // 已完成交易评价 +) + +// Enum value maps for TradeOrderStatusEnum. +var ( + TradeOrderStatusEnum_name = map[int32]string{ + 0: "CREATE", + 1: "PAY", + 2: "DELIVERY_STARTED", + 3: "DELIVERY_FINISHED", + 4: "CLOSED", + 5: "SUCCESS", + 6: "FAIL", + 7: "EVALUATED", + } + TradeOrderStatusEnum_value = map[string]int32{ + "CREATE": 0, + "PAY": 1, + "DELIVERY_STARTED": 2, + "DELIVERY_FINISHED": 3, + "CLOSED": 4, + "SUCCESS": 5, + "FAIL": 6, + "EVALUATED": 7, + } +) + +func (x TradeOrderStatusEnum) Enum() *TradeOrderStatusEnum { + p := new(TradeOrderStatusEnum) + *p = x + return p +} + +func (x TradeOrderStatusEnum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TradeOrderStatusEnum) Descriptor() protoreflect.EnumDescriptor { + return file_trade_entities_proto_enumTypes[4].Descriptor() +} + +func (TradeOrderStatusEnum) Type() protoreflect.EnumType { + return &file_trade_entities_proto_enumTypes[4] +} + +func (x TradeOrderStatusEnum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TradeOrderStatusEnum.Descriptor instead. +func (TradeOrderStatusEnum) EnumDescriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{4} +} + +type PayType int32 + +const ( + PayType_INTERNAL PayType = 0 // DouTok余额支付 + PayType_ALIPAY PayType = 1 // 支付宝支付 +) + +// Enum value maps for PayType. +var ( + PayType_name = map[int32]string{ + 0: "INTERNAL", + 1: "ALIPAY", + } + PayType_value = map[string]int32{ + "INTERNAL": 0, + "ALIPAY": 1, + } +) + +func (x PayType) Enum() *PayType { + p := new(PayType) + *p = x + return p +} + +func (x PayType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PayType) Descriptor() protoreflect.EnumDescriptor { + return file_trade_entities_proto_enumTypes[5].Descriptor() +} + +func (PayType) Type() protoreflect.EnumType { + return &file_trade_entities_proto_enumTypes[5] +} + +func (x PayType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PayType.Descriptor instead. +func (PayType) EnumDescriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{5} +} + +type TradePromotionType int32 + +const ( + TradePromotionType_UNDEFINED_PT TradePromotionType = 0 // 未定义 + TradePromotionType_COUPON_PT TradePromotionType = 1 // 优惠券 +) + +// Enum value maps for TradePromotionType. +var ( + TradePromotionType_name = map[int32]string{ + 0: "UNDEFINED_PT", + 1: "COUPON_PT", + } + TradePromotionType_value = map[string]int32{ + "UNDEFINED_PT": 0, + "COUPON_PT": 1, + } +) + +func (x TradePromotionType) Enum() *TradePromotionType { + p := new(TradePromotionType) + *p = x + return p +} + +func (x TradePromotionType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TradePromotionType) Descriptor() protoreflect.EnumDescriptor { + return file_trade_entities_proto_enumTypes[6].Descriptor() +} + +func (TradePromotionType) Type() protoreflect.EnumType { + return &file_trade_entities_proto_enumTypes[6] +} + +func (x TradePromotionType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TradePromotionType.Descriptor instead. +func (TradePromotionType) EnumDescriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{6} +} + +type DeliveryType int32 + +const ( + DeliveryType_UNDEFINED_DT DeliveryType = 0 // 未定义 + DeliveryType_MERCHANT_DT DeliveryType = 1 // 商家发货 + DeliveryType_PLATFORM_DT DeliveryType = 2 // 平台发货 + DeliveryType_BUYER_DT DeliveryType = 3 // 买家自提 + DeliveryType_NONE_DT DeliveryType = 4 // 无需发货 +) + +// Enum value maps for DeliveryType. +var ( + DeliveryType_name = map[int32]string{ + 0: "UNDEFINED_DT", + 1: "MERCHANT_DT", + 2: "PLATFORM_DT", + 3: "BUYER_DT", + 4: "NONE_DT", + } + DeliveryType_value = map[string]int32{ + "UNDEFINED_DT": 0, + "MERCHANT_DT": 1, + "PLATFORM_DT": 2, + "BUYER_DT": 3, + "NONE_DT": 4, + } +) + +func (x DeliveryType) Enum() *DeliveryType { + p := new(DeliveryType) + *p = x + return p +} + +func (x DeliveryType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DeliveryType) Descriptor() protoreflect.EnumDescriptor { + return file_trade_entities_proto_enumTypes[7].Descriptor() +} + +func (DeliveryType) Type() protoreflect.EnumType { + return &file_trade_entities_proto_enumTypes[7] +} + +func (x DeliveryType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DeliveryType.Descriptor instead. +func (DeliveryType) EnumDescriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{7} +} + +type DeliveryCompany int32 + +const ( + DeliveryCompany_UNDEFINED_DC DeliveryCompany = 0 // 未定义 + DeliveryCompany_SF_DC DeliveryCompany = 1 // 顺丰 + DeliveryCompany_YTO_DC DeliveryCompany = 2 // 圆通 + DeliveryCompany_ZTO_DC DeliveryCompany = 3 // 中通 + DeliveryCompany_STO_DC DeliveryCompany = 4 // 申通 + DeliveryCompany_YD_DC DeliveryCompany = 5 // 韵达 + DeliveryCompany_EMS_DC DeliveryCompany = 6 // EMS + DeliveryCompany_JD_DC DeliveryCompany = 7 // 京东 + DeliveryCompany_OTHER_DC DeliveryCompany = 8 // 其他 +) + +// Enum value maps for DeliveryCompany. +var ( + DeliveryCompany_name = map[int32]string{ + 0: "UNDEFINED_DC", + 1: "SF_DC", + 2: "YTO_DC", + 3: "ZTO_DC", + 4: "STO_DC", + 5: "YD_DC", + 6: "EMS_DC", + 7: "JD_DC", + 8: "OTHER_DC", + } + DeliveryCompany_value = map[string]int32{ + "UNDEFINED_DC": 0, + "SF_DC": 1, + "YTO_DC": 2, + "ZTO_DC": 3, + "STO_DC": 4, + "YD_DC": 5, + "EMS_DC": 6, + "JD_DC": 7, + "OTHER_DC": 8, + } +) + +func (x DeliveryCompany) Enum() *DeliveryCompany { + p := new(DeliveryCompany) + *p = x + return p +} + +func (x DeliveryCompany) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DeliveryCompany) Descriptor() protoreflect.EnumDescriptor { + return file_trade_entities_proto_enumTypes[8].Descriptor() +} + +func (DeliveryCompany) Type() protoreflect.EnumType { + return &file_trade_entities_proto_enumTypes[8] +} + +func (x DeliveryCompany) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DeliveryCompany.Descriptor instead. +func (DeliveryCompany) EnumDescriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{8} +} + +type CloseType int32 + +const ( + CloseType_UNDEFINED_CT CloseType = 0 // 默认值 + CloseType_TIMEOUT_CT CloseType = 1 // 超时关闭 + CloseType_BUYER_CT CloseType = 2 // 买家关闭 + CloseType_SELLER_CT CloseType = 3 // 卖家关闭 +) + +// Enum value maps for CloseType. +var ( + CloseType_name = map[int32]string{ + 0: "UNDEFINED_CT", + 1: "TIMEOUT_CT", + 2: "BUYER_CT", + 3: "SELLER_CT", + } + CloseType_value = map[string]int32{ + "UNDEFINED_CT": 0, + "TIMEOUT_CT": 1, + "BUYER_CT": 2, + "SELLER_CT": 3, + } +) + +func (x CloseType) Enum() *CloseType { + p := new(CloseType) + *p = x + return p +} + +func (x CloseType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CloseType) Descriptor() protoreflect.EnumDescriptor { + return file_trade_entities_proto_enumTypes[9].Descriptor() +} + +func (CloseType) Type() protoreflect.EnumType { + return &file_trade_entities_proto_enumTypes[9] +} + +func (x CloseType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CloseType.Descriptor instead. +func (CloseType) EnumDescriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{9} +} + +type PayScene int32 + +const ( + PayScene_NORMAL_PS PayScene = 0 // 正常支付 +) + +// Enum value maps for PayScene. +var ( + PayScene_name = map[int32]string{ + 0: "NORMAL_PS", + } + PayScene_value = map[string]int32{ + "NORMAL_PS": 0, + } +) + +func (x PayScene) Enum() *PayScene { + p := new(PayScene) + *p = x + return p +} + +func (x PayScene) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PayScene) Descriptor() protoreflect.EnumDescriptor { + return file_trade_entities_proto_enumTypes[10].Descriptor() +} + +func (PayScene) Type() protoreflect.EnumType { + return &file_trade_entities_proto_enumTypes[10] +} + +func (x PayScene) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PayScene.Descriptor instead. +func (PayScene) EnumDescriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{10} +} + +// 支付阶段 +type PayPhase int32 + +const ( + PayPhase_NONE_PP PayPhase = 0 // 一口价 + PayPhase_INITIAL_PP PayPhase = 1 // 初始化完成 + PayPhase_PAYING_PP PayPhase = 2 // 支付中 + PayPhase_PAID_PP PayPhase = 3 // 已支付 +) + +// Enum value maps for PayPhase. +var ( + PayPhase_name = map[int32]string{ + 0: "NONE_PP", + 1: "INITIAL_PP", + 2: "PAYING_PP", + 3: "PAID_PP", + } + PayPhase_value = map[string]int32{ + "NONE_PP": 0, + "INITIAL_PP": 1, + "PAYING_PP": 2, + "PAID_PP": 3, + } +) + +func (x PayPhase) Enum() *PayPhase { + p := new(PayPhase) + *p = x + return p +} + +func (x PayPhase) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PayPhase) Descriptor() protoreflect.EnumDescriptor { + return file_trade_entities_proto_enumTypes[11].Descriptor() +} + +func (PayPhase) Type() protoreflect.EnumType { + return &file_trade_entities_proto_enumTypes[11] +} + +func (x PayPhase) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PayPhase.Descriptor instead. +func (PayPhase) EnumDescriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{11} +} + +type PayChannel int32 + +const ( + PayChannel_UNDEFINED_PC PayChannel = 0 // 未定义 + PayChannel_ALIPAY_PC PayChannel = 1 // 支付宝 + PayChannel_WECHAT_PC PayChannel = 2 // 微信 + PayChannel_UNION_PC PayChannel = 3 // 银联 + PayChannel_APPLE_PC PayChannel = 4 // 苹果支付 + PayChannel_GOOGLE_PC PayChannel = 5 // Google支付 + PayChannel_DOUTOK_PC PayChannel = 6 // Dou币支付 +) + +// Enum value maps for PayChannel. +var ( + PayChannel_name = map[int32]string{ + 0: "UNDEFINED_PC", + 1: "ALIPAY_PC", + 2: "WECHAT_PC", + 3: "UNION_PC", + 4: "APPLE_PC", + 5: "GOOGLE_PC", + 6: "DOUTOK_PC", + } + PayChannel_value = map[string]int32{ + "UNDEFINED_PC": 0, + "ALIPAY_PC": 1, + "WECHAT_PC": 2, + "UNION_PC": 3, + "APPLE_PC": 4, + "GOOGLE_PC": 5, + "DOUTOK_PC": 6, + } +) + +func (x PayChannel) Enum() *PayChannel { + p := new(PayChannel) + *p = x + return p +} + +func (x PayChannel) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PayChannel) Descriptor() protoreflect.EnumDescriptor { + return file_trade_entities_proto_enumTypes[12].Descriptor() +} + +func (PayChannel) Type() protoreflect.EnumType { + return &file_trade_entities_proto_enumTypes[12] +} + +func (x PayChannel) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PayChannel.Descriptor instead. +func (PayChannel) EnumDescriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{12} +} + +type PayStatus int32 + +const ( + PayStatus_INITIAL_PS PayStatus = 0 // 未支付 + PayStatus_PAYING_PS PayStatus = 1 // 支付中 + PayStatus_PAID_PS PayStatus = 2 // 已支付 + PayStatus_CLOSED_PS PayStatus = 3 // 已关闭 +) + +// Enum value maps for PayStatus. +var ( + PayStatus_name = map[int32]string{ + 0: "INITIAL_PS", + 1: "PAYING_PS", + 2: "PAID_PS", + 3: "CLOSED_PS", + } + PayStatus_value = map[string]int32{ + "INITIAL_PS": 0, + "PAYING_PS": 1, + "PAID_PS": 2, + "CLOSED_PS": 3, + } +) + +func (x PayStatus) Enum() *PayStatus { + p := new(PayStatus) + *p = x + return p +} + +func (x PayStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PayStatus) Descriptor() protoreflect.EnumDescriptor { + return file_trade_entities_proto_enumTypes[13].Descriptor() +} + +func (PayStatus) Type() protoreflect.EnumType { + return &file_trade_entities_proto_enumTypes[13] +} + +func (x PayStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PayStatus.Descriptor instead. +func (PayStatus) EnumDescriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{13} +} + +type TradeOrderRelation int32 + +const ( + TradeOrderRelation_ORIGIN_TOR TradeOrderRelation = 0 // 原始交易单 + TradeOrderRelation_RENEW_TOR TradeOrderRelation = 1 // 续单 + TradeOrderRelation_TIED_TOR TradeOrderRelation = 2 // 捆绑单 +) + +// Enum value maps for TradeOrderRelation. +var ( + TradeOrderRelation_name = map[int32]string{ + 0: "ORIGIN_TOR", + 1: "RENEW_TOR", + 2: "TIED_TOR", + } + TradeOrderRelation_value = map[string]int32{ + "ORIGIN_TOR": 0, + "RENEW_TOR": 1, + "TIED_TOR": 2, + } +) + +func (x TradeOrderRelation) Enum() *TradeOrderRelation { + p := new(TradeOrderRelation) + *p = x + return p +} + +func (x TradeOrderRelation) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TradeOrderRelation) Descriptor() protoreflect.EnumDescriptor { + return file_trade_entities_proto_enumTypes[14].Descriptor() +} + +func (TradeOrderRelation) Type() protoreflect.EnumType { + return &file_trade_entities_proto_enumTypes[14] +} + +func (x TradeOrderRelation) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TradeOrderRelation.Descriptor instead. +func (TradeOrderRelation) EnumDescriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{14} +} + +type RefundOrderType int32 + +const ( + RefundOrderType_UNDEFINED_ROT RefundOrderType = 0 // 未定义 + RefundOrderType_BUYER_CANCEL_ROT RefundOrderType = 1 // 买家退款 + RefundOrderType_SELLER_CANCEL_ROT RefundOrderType = 2 // 卖家退款 +) + +// Enum value maps for RefundOrderType. +var ( + RefundOrderType_name = map[int32]string{ + 0: "UNDEFINED_ROT", + 1: "BUYER_CANCEL_ROT", + 2: "SELLER_CANCEL_ROT", + } + RefundOrderType_value = map[string]int32{ + "UNDEFINED_ROT": 0, + "BUYER_CANCEL_ROT": 1, + "SELLER_CANCEL_ROT": 2, + } +) + +func (x RefundOrderType) Enum() *RefundOrderType { + p := new(RefundOrderType) + *p = x + return p +} + +func (x RefundOrderType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RefundOrderType) Descriptor() protoreflect.EnumDescriptor { + return file_trade_entities_proto_enumTypes[15].Descriptor() +} + +func (RefundOrderType) Type() protoreflect.EnumType { + return &file_trade_entities_proto_enumTypes[15] +} + +func (x RefundOrderType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RefundOrderType.Descriptor instead. +func (RefundOrderType) EnumDescriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{15} +} + +type RefundOrderStatus int32 + +const ( + RefundOrderStatus_CREATE_ROS RefundOrderStatus = 0 // 已创建 + RefundOrderStatus_REFUND_ROS RefundOrderStatus = 1 // 已退款 + RefundOrderStatus_CLOSED_ROS RefundOrderStatus = 2 // 已关闭 +) + +// Enum value maps for RefundOrderStatus. +var ( + RefundOrderStatus_name = map[int32]string{ + 0: "CREATE_ROS", + 1: "REFUND_ROS", + 2: "CLOSED_ROS", + } + RefundOrderStatus_value = map[string]int32{ + "CREATE_ROS": 0, + "REFUND_ROS": 1, + "CLOSED_ROS": 2, + } +) + +func (x RefundOrderStatus) Enum() *RefundOrderStatus { + p := new(RefundOrderStatus) + *p = x + return p +} + +func (x RefundOrderStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RefundOrderStatus) Descriptor() protoreflect.EnumDescriptor { + return file_trade_entities_proto_enumTypes[16].Descriptor() +} + +func (RefundOrderStatus) Type() protoreflect.EnumType { + return &file_trade_entities_proto_enumTypes[16] +} + +func (x RefundOrderStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RefundOrderStatus.Descriptor instead. +func (RefundOrderStatus) EnumDescriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{16} +} + +// 交易参与人信息 +type TradeParticipant struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountId int64 `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // 账户id +} + +func (x *TradeParticipant) Reset() { + *x = TradeParticipant{} + if protoimpl.UnsafeEnabled { + mi := &file_trade_entities_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TradeParticipant) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TradeParticipant) ProtoMessage() {} + +func (x *TradeParticipant) ProtoReflect() protoreflect.Message { + mi := &file_trade_entities_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TradeParticipant.ProtoReflect.Descriptor instead. +func (*TradeParticipant) Descriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{0} +} + +func (x *TradeParticipant) GetAccountId() int64 { + if x != nil { + return x.AccountId + } + return 0 +} + +type TradePromotion struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PromotionId int64 `protobuf:"varint,1,opt,name=promotion_id,json=promotionId,proto3" json:"promotion_id,omitempty"` // 优惠id + PromotionName string `protobuf:"bytes,2,opt,name=promotion_name,json=promotionName,proto3" json:"promotion_name,omitempty"` // 优惠名称 + PromotionAmount uint64 `protobuf:"varint,3,opt,name=promotion_amount,json=promotionAmount,proto3" json:"promotion_amount,omitempty"` // 优惠金额 单位:分 + Decrption string `protobuf:"bytes,4,opt,name=decrption,proto3" json:"decrption,omitempty"` // 描述 + PromotionType TradePromotionType `protobuf:"varint,5,opt,name=promotion_type,json=promotionType,proto3,enum=api.TradePromotionType" json:"promotion_type,omitempty"` // 优惠类型 + EntryId int64 `protobuf:"varint,6,opt,name=entry_id,json=entryId,proto3" json:"entry_id,omitempty"` // 优惠总类id + AccountId int64 `protobuf:"varint,7,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // 所属账户id +} + +func (x *TradePromotion) Reset() { + *x = TradePromotion{} + if protoimpl.UnsafeEnabled { + mi := &file_trade_entities_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TradePromotion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TradePromotion) ProtoMessage() {} + +func (x *TradePromotion) ProtoReflect() protoreflect.Message { + mi := &file_trade_entities_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TradePromotion.ProtoReflect.Descriptor instead. +func (*TradePromotion) Descriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{1} +} + +func (x *TradePromotion) GetPromotionId() int64 { + if x != nil { + return x.PromotionId + } + return 0 +} + +func (x *TradePromotion) GetPromotionName() string { + if x != nil { + return x.PromotionName + } + return "" +} + +func (x *TradePromotion) GetPromotionAmount() uint64 { + if x != nil { + return x.PromotionAmount + } + return 0 +} + +func (x *TradePromotion) GetDecrption() string { + if x != nil { + return x.Decrption + } + return "" +} + +func (x *TradePromotion) GetPromotionType() TradePromotionType { + if x != nil { + return x.PromotionType + } + return TradePromotionType_UNDEFINED_PT +} + +func (x *TradePromotion) GetEntryId() int64 { + if x != nil { + return x.EntryId + } + return 0 +} + +func (x *TradePromotion) GetAccountId() int64 { + if x != nil { + return x.AccountId + } + return 0 +} + +type DeliveryInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DeliveryType DeliveryType `protobuf:"varint,1,opt,name=delivery_type,json=deliveryType,proto3,enum=api.DeliveryType" json:"delivery_type,omitempty"` // 发货类型 + DeliveryCompany DeliveryCompany `protobuf:"varint,2,opt,name=delivery_company,json=deliveryCompany,proto3,enum=api.DeliveryCompany" json:"delivery_company,omitempty"` // 快递公司 + DeliveryNo string `protobuf:"bytes,3,opt,name=delivery_no,json=deliveryNo,proto3" json:"delivery_no,omitempty"` // 快递单号 + Id int64 `protobuf:"varint,4,opt,name=id,proto3" json:"id,omitempty"` // 发货信息id + ReceiverName string `protobuf:"bytes,5,opt,name=receiver_name,json=receiverName,proto3" json:"receiver_name,omitempty"` // 收货人姓名 + ReceiverMobile string `protobuf:"bytes,6,opt,name=receiver_mobile,json=receiverMobile,proto3" json:"receiver_mobile,omitempty"` // 收货人手机号 + ReceiverAddress string `protobuf:"bytes,7,opt,name=receiver_address,json=receiverAddress,proto3" json:"receiver_address,omitempty"` // 收货人地址 + Extra map[string]string `protobuf:"bytes,8,rep,name=extra,proto3" json:"extra,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 额外信息 +} + +func (x *DeliveryInfo) Reset() { + *x = DeliveryInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_trade_entities_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeliveryInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeliveryInfo) ProtoMessage() {} + +func (x *DeliveryInfo) ProtoReflect() protoreflect.Message { + mi := &file_trade_entities_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeliveryInfo.ProtoReflect.Descriptor instead. +func (*DeliveryInfo) Descriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{2} +} + +func (x *DeliveryInfo) GetDeliveryType() DeliveryType { + if x != nil { + return x.DeliveryType + } + return DeliveryType_UNDEFINED_DT +} + +func (x *DeliveryInfo) GetDeliveryCompany() DeliveryCompany { + if x != nil { + return x.DeliveryCompany + } + return DeliveryCompany_UNDEFINED_DC +} + +func (x *DeliveryInfo) GetDeliveryNo() string { + if x != nil { + return x.DeliveryNo + } + return "" +} + +func (x *DeliveryInfo) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *DeliveryInfo) GetReceiverName() string { + if x != nil { + return x.ReceiverName + } + return "" +} + +func (x *DeliveryInfo) GetReceiverMobile() string { + if x != nil { + return x.ReceiverMobile + } + return "" +} + +func (x *DeliveryInfo) GetReceiverAddress() string { + if x != nil { + return x.ReceiverAddress + } + return "" +} + +func (x *DeliveryInfo) GetExtra() map[string]string { + if x != nil { + return x.Extra + } + return nil +} + +type TimeoutInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ExpectTimeOut int64 `protobuf:"varint,1,opt,name=expect_time_out,json=expectTimeOut,proto3" json:"expect_time_out,omitempty"` // 预计超时时间 + ActualTimeOut int64 `protobuf:"varint,2,opt,name=actual_time_out,json=actualTimeOut,proto3" json:"actual_time_out,omitempty"` // 实际超时时间 + Executed bool `protobuf:"varint,3,opt,name=executed,proto3" json:"executed,omitempty"` // 是否已执行超时后操作 +} + +func (x *TimeoutInfo) Reset() { + *x = TimeoutInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_trade_entities_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TimeoutInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TimeoutInfo) ProtoMessage() {} + +func (x *TimeoutInfo) ProtoReflect() protoreflect.Message { + mi := &file_trade_entities_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TimeoutInfo.ProtoReflect.Descriptor instead. +func (*TimeoutInfo) Descriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{3} +} + +func (x *TimeoutInfo) GetExpectTimeOut() int64 { + if x != nil { + return x.ExpectTimeOut + } + return 0 +} + +func (x *TimeoutInfo) GetActualTimeOut() int64 { + if x != nil { + return x.ActualTimeOut + } + return 0 +} + +func (x *TimeoutInfo) GetExecuted() bool { + if x != nil { + return x.Executed + } + return false +} + +type PaymentInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 支付信息id + OrderId int64 `protobuf:"varint,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` // 所属交易单id + PaymentNo string `protobuf:"bytes,3,opt,name=payment_no,json=paymentNo,proto3" json:"payment_no,omitempty"` // 外部平台支付单号 + PayScene PayScene `protobuf:"varint,4,opt,name=pay_scene,json=payScene,proto3,enum=api.PayScene" json:"pay_scene,omitempty"` // 支付场景 + PaidAmount uint64 `protobuf:"varint,5,opt,name=paid_amount,json=paidAmount,proto3" json:"paid_amount,omitempty"` // 支付金额 单位:分 + PayPhase PayPhase `protobuf:"varint,6,opt,name=pay_phase,json=payPhase,proto3,enum=api.PayPhase" json:"pay_phase,omitempty"` // 支付阶段 + PayChannel PayChannel `protobuf:"varint,7,opt,name=pay_channel,json=payChannel,proto3,enum=api.PayChannel" json:"pay_channel,omitempty"` // 支付渠道 + PayStatus PayStatus `protobuf:"varint,8,opt,name=pay_status,json=payStatus,proto3,enum=api.PayStatus" json:"pay_status,omitempty"` // 支付状态 + CreateTime int64 `protobuf:"varint,9,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` // 创建时间 + PayTime int64 `protobuf:"varint,10,opt,name=pay_time,json=payTime,proto3" json:"pay_time,omitempty"` // 支付时间 + CloseTime int64 `protobuf:"varint,11,opt,name=close_time,json=closeTime,proto3" json:"close_time,omitempty"` // 关闭时间 + SuccessTime int64 `protobuf:"varint,12,opt,name=success_time,json=successTime,proto3" json:"success_time,omitempty"` // 成功时间 + UpdateTime int64 `protobuf:"varint,13,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` // 更新时间 +} + +func (x *PaymentInfo) Reset() { + *x = PaymentInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_trade_entities_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PaymentInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PaymentInfo) ProtoMessage() {} + +func (x *PaymentInfo) ProtoReflect() protoreflect.Message { + mi := &file_trade_entities_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PaymentInfo.ProtoReflect.Descriptor instead. +func (*PaymentInfo) Descriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{4} +} + +func (x *PaymentInfo) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *PaymentInfo) GetOrderId() int64 { + if x != nil { + return x.OrderId + } + return 0 +} + +func (x *PaymentInfo) GetPaymentNo() string { + if x != nil { + return x.PaymentNo + } + return "" +} + +func (x *PaymentInfo) GetPayScene() PayScene { + if x != nil { + return x.PayScene + } + return PayScene_NORMAL_PS +} + +func (x *PaymentInfo) GetPaidAmount() uint64 { + if x != nil { + return x.PaidAmount + } + return 0 +} + +func (x *PaymentInfo) GetPayPhase() PayPhase { + if x != nil { + return x.PayPhase + } + return PayPhase_NONE_PP +} + +func (x *PaymentInfo) GetPayChannel() PayChannel { + if x != nil { + return x.PayChannel + } + return PayChannel_UNDEFINED_PC +} + +func (x *PaymentInfo) GetPayStatus() PayStatus { + if x != nil { + return x.PayStatus + } + return PayStatus_INITIAL_PS +} + +func (x *PaymentInfo) GetCreateTime() int64 { + if x != nil { + return x.CreateTime + } + return 0 +} + +func (x *PaymentInfo) GetPayTime() int64 { + if x != nil { + return x.PayTime + } + return 0 +} + +func (x *PaymentInfo) GetCloseTime() int64 { + if x != nil { + return x.CloseTime + } + return 0 +} + +func (x *PaymentInfo) GetSuccessTime() int64 { + if x != nil { + return x.SuccessTime + } + return 0 +} + +func (x *PaymentInfo) GetUpdateTime() int64 { + if x != nil { + return x.UpdateTime + } + return 0 +} + +// 退款单 +type RefundOrder struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RefundId int64 `protobuf:"varint,1,opt,name=refund_id,json=refundId,proto3" json:"refund_id,omitempty"` // 退款单id + OrderId int64 `protobuf:"varint,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` // 交易单id + PaymentId int64 `protobuf:"varint,3,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` // 支付信息id + RefundAmount int64 `protobuf:"varint,4,opt,name=refund_amount,json=refundAmount,proto3" json:"refund_amount,omitempty"` // 退款金额 单位:分 + RefundTime int64 `protobuf:"varint,5,opt,name=refund_time,json=refundTime,proto3" json:"refund_time,omitempty"` // 退款时间 + CreateTime int64 `protobuf:"varint,6,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` // 创建时间 + UpdateTime int64 `protobuf:"varint,7,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` // 更新时间 + CloseTime int64 `protobuf:"varint,8,opt,name=close_time,json=closeTime,proto3" json:"close_time,omitempty"` // 关闭时间 + RefundReason string `protobuf:"bytes,9,opt,name=refund_reason,json=refundReason,proto3" json:"refund_reason,omitempty"` // 退款原因 + RefundType RefundOrderType `protobuf:"varint,10,opt,name=refund_type,json=refundType,proto3,enum=api.RefundOrderType" json:"refund_type,omitempty"` // 退款类型 + RefundStatus RefundOrderStatus `protobuf:"varint,11,opt,name=refund_status,json=refundStatus,proto3,enum=api.RefundOrderStatus" json:"refund_status,omitempty"` // 退款状态 +} + +func (x *RefundOrder) Reset() { + *x = RefundOrder{} + if protoimpl.UnsafeEnabled { + mi := &file_trade_entities_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RefundOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefundOrder) ProtoMessage() {} + +func (x *RefundOrder) ProtoReflect() protoreflect.Message { + mi := &file_trade_entities_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefundOrder.ProtoReflect.Descriptor instead. +func (*RefundOrder) Descriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{5} +} + +func (x *RefundOrder) GetRefundId() int64 { + if x != nil { + return x.RefundId + } + return 0 +} + +func (x *RefundOrder) GetOrderId() int64 { + if x != nil { + return x.OrderId + } + return 0 +} + +func (x *RefundOrder) GetPaymentId() int64 { + if x != nil { + return x.PaymentId + } + return 0 +} + +func (x *RefundOrder) GetRefundAmount() int64 { + if x != nil { + return x.RefundAmount + } + return 0 +} + +func (x *RefundOrder) GetRefundTime() int64 { + if x != nil { + return x.RefundTime + } + return 0 +} + +func (x *RefundOrder) GetCreateTime() int64 { + if x != nil { + return x.CreateTime + } + return 0 +} + +func (x *RefundOrder) GetUpdateTime() int64 { + if x != nil { + return x.UpdateTime + } + return 0 +} + +func (x *RefundOrder) GetCloseTime() int64 { + if x != nil { + return x.CloseTime + } + return 0 +} + +func (x *RefundOrder) GetRefundReason() string { + if x != nil { + return x.RefundReason + } + return "" +} + +func (x *RefundOrder) GetRefundType() RefundOrderType { + if x != nil { + return x.RefundType + } + return RefundOrderType_UNDEFINED_ROT +} + +func (x *RefundOrder) GetRefundStatus() RefundOrderStatus { + if x != nil { + return x.RefundStatus + } + return RefundOrderStatus_CREATE_ROS +} + +// 交易单 +type TradeOrder struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrderId int64 `protobuf:"varint,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` // 交易单id + BizType TradeBizType `protobuf:"varint,2,opt,name=biz_type,json=bizType,proto3,enum=api.TradeBizType" json:"biz_type,omitempty"` // 业务类型 + SaleWay TradeSaleWay `protobuf:"varint,3,opt,name=sale_way,json=saleWay,proto3,enum=api.TradeSaleWay" json:"sale_way,omitempty"` // 销售方式 + PaySequence TradePaySequence `protobuf:"varint,4,opt,name=pay_sequence,json=paySequence,proto3,enum=api.TradePaySequence" json:"pay_sequence,omitempty"` // 支付顺序 + GoodsType TradeGoodsType `protobuf:"varint,5,opt,name=goods_type,json=goodsType,proto3,enum=api.TradeGoodsType" json:"goods_type,omitempty"` // 商品类型 + OrderStatus TradeOrderStatusEnum `protobuf:"varint,6,opt,name=order_status,json=orderStatus,proto3,enum=api.TradeOrderStatusEnum" json:"order_status,omitempty"` // 交易单状态 + BizStatus int64 `protobuf:"varint,7,opt,name=biz_status,json=bizStatus,proto3" json:"biz_status,omitempty"` // 业务状态(具体业务自定义) + BizOrderNo string `protobuf:"bytes,8,opt,name=biz_order_no,json=bizOrderNo,proto3" json:"biz_order_no,omitempty"` // 业务订单号 + BizId int64 `protobuf:"varint,9,opt,name=biz_id,json=bizId,proto3" json:"biz_id,omitempty"` // 业务id + Buyer *TradeParticipant `protobuf:"bytes,10,opt,name=buyer,proto3" json:"buyer,omitempty"` // 买家信息 + Seller *TradeParticipant `protobuf:"bytes,11,opt,name=seller,proto3" json:"seller,omitempty"` // 卖家信息 + PayType PayType `protobuf:"varint,12,opt,name=pay_type,json=payType,proto3,enum=api.PayType" json:"pay_type,omitempty"` // 支付类型 + PayableAmount uint64 `protobuf:"varint,13,opt,name=payable_amount,json=payableAmount,proto3" json:"payable_amount,omitempty"` // 应支付金额 单位:分 + PaidAmount uint64 `protobuf:"varint,14,opt,name=paid_amount,json=paidAmount,proto3" json:"paid_amount,omitempty"` // 已支付金额 单位:分 + PromotionAmount uint64 `protobuf:"varint,15,opt,name=promotion_amount,json=promotionAmount,proto3" json:"promotion_amount,omitempty"` // 优惠金额 单位:分 + Promotions []*TradePromotion `protobuf:"bytes,16,rep,name=promotions,proto3" json:"promotions,omitempty"` // 优惠信息 + DeliveryInfo *DeliveryInfo `protobuf:"bytes,17,opt,name=delivery_info,json=deliveryInfo,proto3" json:"delivery_info,omitempty"` // 发货信息 + CreateTime int64 `protobuf:"varint,18,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` // 创建时间 + PayTime int64 `protobuf:"varint,19,opt,name=pay_time,json=payTime,proto3" json:"pay_time,omitempty"` // 支付时间 + DeliveryTime int64 `protobuf:"varint,20,opt,name=delivery_time,json=deliveryTime,proto3" json:"delivery_time,omitempty"` // 发货时间 + CloseTime int64 `protobuf:"varint,21,opt,name=close_time,json=closeTime,proto3" json:"close_time,omitempty"` // 关闭时间 + TimeoutInfo *TimeoutInfo `protobuf:"bytes,22,opt,name=timeout_info,json=timeoutInfo,proto3" json:"timeout_info,omitempty"` // 超时信息 + CloseType CloseType `protobuf:"varint,23,opt,name=close_type,json=closeType,proto3,enum=api.CloseType" json:"close_type,omitempty"` // 关闭类型 + CloseReason string `protobuf:"bytes,24,opt,name=close_reason,json=closeReason,proto3" json:"close_reason,omitempty"` // 关闭原因 + SubOrder []*TradeOrder `protobuf:"bytes,25,rep,name=sub_order,json=subOrder,proto3" json:"sub_order,omitempty"` // 子订单 + Payments []*PaymentInfo `protobuf:"bytes,26,rep,name=payments,proto3" json:"payments,omitempty"` // 支付信息 + Extra map[string]string `protobuf:"bytes,27,rep,name=extra,proto3" json:"extra,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 额外信息 + TradeOrderRelation TradeOrderRelation `protobuf:"varint,28,opt,name=trade_order_relation,json=tradeOrderRelation,proto3,enum=api.TradeOrderRelation" json:"trade_order_relation,omitempty"` // 关系类型; 是sub order才有 + OriginOrderId int64 `protobuf:"varint,29,opt,name=origin_order_id,json=originOrderId,proto3" json:"origin_order_id,omitempty"` // 原始交易单id; 是sub order才有 + Refunds []*RefundOrder `protobuf:"bytes,30,rep,name=refunds,proto3" json:"refunds,omitempty"` // 退款单 +} + +func (x *TradeOrder) Reset() { + *x = TradeOrder{} + if protoimpl.UnsafeEnabled { + mi := &file_trade_entities_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TradeOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TradeOrder) ProtoMessage() {} + +func (x *TradeOrder) ProtoReflect() protoreflect.Message { + mi := &file_trade_entities_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TradeOrder.ProtoReflect.Descriptor instead. +func (*TradeOrder) Descriptor() ([]byte, []int) { + return file_trade_entities_proto_rawDescGZIP(), []int{6} +} + +func (x *TradeOrder) GetOrderId() int64 { + if x != nil { + return x.OrderId + } + return 0 +} + +func (x *TradeOrder) GetBizType() TradeBizType { + if x != nil { + return x.BizType + } + return TradeBizType_DEFAULT_BT +} + +func (x *TradeOrder) GetSaleWay() TradeSaleWay { + if x != nil { + return x.SaleWay + } + return TradeSaleWay_DEFAULT_SW +} + +func (x *TradeOrder) GetPaySequence() TradePaySequence { + if x != nil { + return x.PaySequence + } + return TradePaySequence_PAY_FIRST +} + +func (x *TradeOrder) GetGoodsType() TradeGoodsType { + if x != nil { + return x.GoodsType + } + return TradeGoodsType_DEFAULT_GT +} + +func (x *TradeOrder) GetOrderStatus() TradeOrderStatusEnum { + if x != nil { + return x.OrderStatus + } + return TradeOrderStatusEnum_CREATE +} + +func (x *TradeOrder) GetBizStatus() int64 { + if x != nil { + return x.BizStatus + } + return 0 +} + +func (x *TradeOrder) GetBizOrderNo() string { + if x != nil { + return x.BizOrderNo + } + return "" +} + +func (x *TradeOrder) GetBizId() int64 { + if x != nil { + return x.BizId + } + return 0 +} + +func (x *TradeOrder) GetBuyer() *TradeParticipant { + if x != nil { + return x.Buyer + } + return nil +} + +func (x *TradeOrder) GetSeller() *TradeParticipant { + if x != nil { + return x.Seller + } + return nil +} + +func (x *TradeOrder) GetPayType() PayType { + if x != nil { + return x.PayType + } + return PayType_INTERNAL +} + +func (x *TradeOrder) GetPayableAmount() uint64 { + if x != nil { + return x.PayableAmount + } + return 0 +} + +func (x *TradeOrder) GetPaidAmount() uint64 { + if x != nil { + return x.PaidAmount + } + return 0 +} + +func (x *TradeOrder) GetPromotionAmount() uint64 { + if x != nil { + return x.PromotionAmount + } + return 0 +} + +func (x *TradeOrder) GetPromotions() []*TradePromotion { + if x != nil { + return x.Promotions + } + return nil +} + +func (x *TradeOrder) GetDeliveryInfo() *DeliveryInfo { + if x != nil { + return x.DeliveryInfo + } + return nil +} + +func (x *TradeOrder) GetCreateTime() int64 { + if x != nil { + return x.CreateTime + } + return 0 +} + +func (x *TradeOrder) GetPayTime() int64 { + if x != nil { + return x.PayTime + } + return 0 +} + +func (x *TradeOrder) GetDeliveryTime() int64 { + if x != nil { + return x.DeliveryTime + } + return 0 +} + +func (x *TradeOrder) GetCloseTime() int64 { + if x != nil { + return x.CloseTime + } + return 0 +} + +func (x *TradeOrder) GetTimeoutInfo() *TimeoutInfo { + if x != nil { + return x.TimeoutInfo + } + return nil +} + +func (x *TradeOrder) GetCloseType() CloseType { + if x != nil { + return x.CloseType + } + return CloseType_UNDEFINED_CT +} + +func (x *TradeOrder) GetCloseReason() string { + if x != nil { + return x.CloseReason + } + return "" +} + +func (x *TradeOrder) GetSubOrder() []*TradeOrder { + if x != nil { + return x.SubOrder + } + return nil +} + +func (x *TradeOrder) GetPayments() []*PaymentInfo { + if x != nil { + return x.Payments + } + return nil +} + +func (x *TradeOrder) GetExtra() map[string]string { + if x != nil { + return x.Extra + } + return nil +} + +func (x *TradeOrder) GetTradeOrderRelation() TradeOrderRelation { + if x != nil { + return x.TradeOrderRelation + } + return TradeOrderRelation_ORIGIN_TOR +} + +func (x *TradeOrder) GetOriginOrderId() int64 { + if x != nil { + return x.OriginOrderId + } + return 0 +} + +func (x *TradeOrder) GetRefunds() []*RefundOrder { + if x != nil { + return x.Refunds + } + return nil +} + +var File_trade_entities_proto protoreflect.FileDescriptor + +var file_trade_entities_proto_rawDesc = []byte{ + 0x0a, 0x14, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1b, 0x62, 0x75, 0x66, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x31, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x64, + 0x65, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x9d, 0x02, 0x0a, 0x0e, + 0x54, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, + 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x6d, 0x6f, + 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x6d, + 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x3e, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x54, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x9f, 0x03, 0x0a, 0x0c, + 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x36, 0x0a, 0x0d, + 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, + 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x3f, 0x0a, 0x10, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, + 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6d, + 0x70, 0x61, 0x6e, 0x79, 0x52, 0x0f, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, + 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, + 0x79, 0x5f, 0x6e, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x69, + 0x76, 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x4d, 0x6f, + 0x62, 0x69, 0x6c, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x32, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, + 0x6f, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x65, 0x78, + 0x74, 0x72, 0x61, 0x1a, 0x38, 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x79, 0x0a, + 0x0b, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26, 0x0a, 0x0f, + 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x75, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x4f, 0x75, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x61, + 0x63, 0x74, 0x75, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x75, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x22, 0xd0, 0x03, 0x0a, 0x0b, 0x50, 0x61, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6e, + 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x4e, 0x6f, 0x12, 0x2a, 0x0a, 0x09, 0x70, 0x61, 0x79, 0x5f, 0x73, 0x63, 0x65, 0x6e, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x79, 0x53, + 0x63, 0x65, 0x6e, 0x65, 0x52, 0x08, 0x70, 0x61, 0x79, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x70, 0x61, 0x69, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x61, 0x69, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x2a, 0x0a, 0x09, 0x70, 0x61, 0x79, 0x5f, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x79, 0x50, 0x68, 0x61, 0x73, + 0x65, 0x52, 0x08, 0x70, 0x61, 0x79, 0x50, 0x68, 0x61, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x0b, 0x70, + 0x61, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x52, 0x0a, 0x70, 0x61, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x2d, 0x0a, + 0x0a, 0x70, 0x61, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x09, 0x70, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x0b, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, + 0x08, 0x70, 0x61, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x07, 0x70, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x73, + 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6c, + 0x6f, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xa4, 0x03, 0x0a, 0x0b, + 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x72, + 0x65, 0x66, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, + 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x5f, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x75, 0x6e, + 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x66, 0x75, 0x6e, + 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, + 0x66, 0x75, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, + 0x6f, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x66, + 0x75, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x35, + 0x0a, 0x0b, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x66, 0x75, 0x6e, + 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3b, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x22, 0xda, 0x0a, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x08, + 0x62, 0x69, 0x7a, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x42, 0x69, 0x7a, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x07, 0x62, 0x69, 0x7a, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x73, 0x61, + 0x6c, 0x65, 0x5f, 0x77, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x57, 0x61, 0x79, 0x52, + 0x07, 0x73, 0x61, 0x6c, 0x65, 0x57, 0x61, 0x79, 0x12, 0x38, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x5f, + 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x50, 0x61, 0x79, 0x53, 0x65, 0x71, + 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, + 0x63, 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, + 0x64, 0x65, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x67, 0x6f, 0x6f, + 0x64, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3c, 0x0a, 0x0c, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0b, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x69, 0x7a, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x69, 0x7a, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x20, 0x0a, 0x0c, 0x62, 0x69, 0x7a, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x5f, 0x6e, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x69, 0x7a, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x69, 0x7a, 0x5f, 0x69, 0x64, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x62, 0x69, 0x7a, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x05, + 0x62, 0x75, 0x79, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, + 0x6e, 0x74, 0x52, 0x05, 0x62, 0x75, 0x79, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x06, 0x73, 0x65, 0x6c, + 0x6c, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x54, 0x72, 0x61, 0x64, 0x65, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, + 0x52, 0x06, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x08, 0x70, 0x61, 0x79, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x50, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x70, 0x61, 0x79, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x61, 0x62, + 0x6c, 0x65, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x69, 0x64, + 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, + 0x61, 0x69, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, + 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, + 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, + 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x36, 0x0a, 0x0d, 0x64, 0x65, 0x6c, + 0x69, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x12, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x13, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x70, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x23, 0x0a, + 0x0d, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x14, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x15, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x33, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x66, + 0x6f, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x73, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x72, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x6f, + 0x73, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x5f, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x08, 0x73, 0x75, + 0x62, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x08, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, + 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x1b, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x12, 0x49, 0x0a, 0x14, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x1c, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x74, + 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x07, 0x72, 0x65, 0x66, + 0x75, 0x6e, 0x64, 0x73, 0x18, 0x1e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x07, 0x72, 0x65, + 0x66, 0x75, 0x6e, 0x64, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, + 0x43, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x64, 0x65, 0x42, 0x69, 0x7a, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x42, 0x54, 0x10, 0x00, 0x12, + 0x0f, 0x0a, 0x0b, 0x52, 0x45, 0x43, 0x48, 0x41, 0x52, 0x47, 0x45, 0x5f, 0x42, 0x54, 0x10, 0x01, + 0x12, 0x12, 0x0a, 0x0e, 0x4d, 0x41, 0x4c, 0x4c, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x53, 0x5f, + 0x42, 0x54, 0x10, 0x02, 0x2a, 0x3d, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x64, 0x65, 0x53, 0x61, 0x6c, + 0x65, 0x57, 0x61, 0x79, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, + 0x53, 0x57, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x53, + 0x57, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x44, 0x41, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x53, + 0x57, 0x10, 0x02, 0x2a, 0x2f, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x64, 0x65, 0x50, 0x61, 0x79, 0x53, + 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x41, 0x59, 0x5f, 0x46, + 0x49, 0x52, 0x53, 0x54, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x41, 0x59, 0x5f, 0x4c, 0x41, + 0x53, 0x54, 0x10, 0x01, 0x2a, 0x4e, 0x0a, 0x0e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x47, 0x6f, 0x6f, + 0x64, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, + 0x54, 0x5f, 0x47, 0x54, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, + 0x5f, 0x47, 0x54, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x56, 0x49, 0x52, 0x54, 0x55, 0x41, 0x4c, + 0x5f, 0x47, 0x54, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x55, 0x50, 0x4f, 0x4e, 0x5f, + 0x47, 0x54, 0x10, 0x03, 0x2a, 0x8a, 0x01, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0a, 0x0a, + 0x06, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x41, 0x59, + 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x45, 0x4c, 0x49, 0x56, 0x45, 0x52, 0x59, 0x5f, 0x53, + 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x45, 0x4c, 0x49, + 0x56, 0x45, 0x52, 0x59, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x03, 0x12, + 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x53, + 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x05, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x41, 0x49, 0x4c, + 0x10, 0x06, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x56, 0x41, 0x4c, 0x55, 0x41, 0x54, 0x45, 0x44, 0x10, + 0x07, 0x2a, 0x23, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, + 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x4c, + 0x49, 0x50, 0x41, 0x59, 0x10, 0x01, 0x2a, 0x35, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x64, 0x65, 0x50, + 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, + 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x5f, 0x50, 0x54, 0x10, 0x00, 0x12, 0x0d, + 0x0a, 0x09, 0x43, 0x4f, 0x55, 0x50, 0x4f, 0x4e, 0x5f, 0x50, 0x54, 0x10, 0x01, 0x2a, 0x5d, 0x0a, + 0x0c, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, + 0x0c, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x5f, 0x44, 0x54, 0x10, 0x00, 0x12, + 0x0f, 0x0a, 0x0b, 0x4d, 0x45, 0x52, 0x43, 0x48, 0x41, 0x4e, 0x54, 0x5f, 0x44, 0x54, 0x10, 0x01, + 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x4c, 0x41, 0x54, 0x46, 0x4f, 0x52, 0x4d, 0x5f, 0x44, 0x54, 0x10, + 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x55, 0x59, 0x45, 0x52, 0x5f, 0x44, 0x54, 0x10, 0x03, 0x12, + 0x0b, 0x0a, 0x07, 0x4e, 0x4f, 0x4e, 0x45, 0x5f, 0x44, 0x54, 0x10, 0x04, 0x2a, 0x82, 0x01, 0x0a, + 0x0f, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, + 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x5f, 0x44, 0x43, + 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x46, 0x5f, 0x44, 0x43, 0x10, 0x01, 0x12, 0x0a, 0x0a, + 0x06, 0x59, 0x54, 0x4f, 0x5f, 0x44, 0x43, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x5a, 0x54, 0x4f, + 0x5f, 0x44, 0x43, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x4f, 0x5f, 0x44, 0x43, 0x10, + 0x04, 0x12, 0x09, 0x0a, 0x05, 0x59, 0x44, 0x5f, 0x44, 0x43, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, + 0x45, 0x4d, 0x53, 0x5f, 0x44, 0x43, 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05, 0x4a, 0x44, 0x5f, 0x44, + 0x43, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f, 0x44, 0x43, 0x10, + 0x08, 0x2a, 0x4a, 0x0a, 0x09, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, + 0x0a, 0x0c, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x5f, 0x43, 0x54, 0x10, 0x00, + 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x5f, 0x43, 0x54, 0x10, 0x01, + 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x55, 0x59, 0x45, 0x52, 0x5f, 0x43, 0x54, 0x10, 0x02, 0x12, 0x0d, + 0x0a, 0x09, 0x53, 0x45, 0x4c, 0x4c, 0x45, 0x52, 0x5f, 0x43, 0x54, 0x10, 0x03, 0x2a, 0x19, 0x0a, + 0x08, 0x50, 0x61, 0x79, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x52, + 0x4d, 0x41, 0x4c, 0x5f, 0x50, 0x53, 0x10, 0x00, 0x2a, 0x43, 0x0a, 0x08, 0x50, 0x61, 0x79, 0x50, + 0x68, 0x61, 0x73, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x4f, 0x4e, 0x45, 0x5f, 0x50, 0x50, 0x10, + 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x50, 0x50, 0x10, + 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x41, 0x59, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x50, 0x10, 0x02, + 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x41, 0x49, 0x44, 0x5f, 0x50, 0x50, 0x10, 0x03, 0x2a, 0x76, 0x0a, + 0x0a, 0x50, 0x61, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x10, 0x0a, 0x0c, 0x55, + 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x5f, 0x50, 0x43, 0x10, 0x00, 0x12, 0x0d, 0x0a, + 0x09, 0x41, 0x4c, 0x49, 0x50, 0x41, 0x59, 0x5f, 0x50, 0x43, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, + 0x57, 0x45, 0x43, 0x48, 0x41, 0x54, 0x5f, 0x50, 0x43, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x55, + 0x4e, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x43, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x50, 0x50, + 0x4c, 0x45, 0x5f, 0x50, 0x43, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x4f, 0x4f, 0x47, 0x4c, + 0x45, 0x5f, 0x50, 0x43, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x4f, 0x55, 0x54, 0x4f, 0x4b, + 0x5f, 0x50, 0x43, 0x10, 0x06, 0x2a, 0x46, 0x0a, 0x09, 0x50, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x50, 0x53, + 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x41, 0x59, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x53, 0x10, + 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x41, 0x49, 0x44, 0x5f, 0x50, 0x53, 0x10, 0x02, 0x12, 0x0d, + 0x0a, 0x09, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x5f, 0x50, 0x53, 0x10, 0x03, 0x2a, 0x41, 0x0a, + 0x12, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x52, 0x49, 0x47, 0x49, 0x4e, 0x5f, 0x54, 0x4f, + 0x52, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x4e, 0x45, 0x57, 0x5f, 0x54, 0x4f, 0x52, + 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x49, 0x45, 0x44, 0x5f, 0x54, 0x4f, 0x52, 0x10, 0x02, + 0x2a, 0x51, 0x0a, 0x0f, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, + 0x5f, 0x52, 0x4f, 0x54, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x59, 0x45, 0x52, 0x5f, + 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x5f, 0x52, 0x4f, 0x54, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, + 0x53, 0x45, 0x4c, 0x4c, 0x45, 0x52, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x5f, 0x52, 0x4f, + 0x54, 0x10, 0x02, 0x2a, 0x43, 0x0a, 0x11, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x52, 0x45, 0x41, + 0x54, 0x45, 0x5f, 0x52, 0x4f, 0x53, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x45, 0x46, 0x55, + 0x4e, 0x44, 0x5f, 0x52, 0x4f, 0x53, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x4c, 0x4f, 0x53, + 0x45, 0x44, 0x5f, 0x52, 0x4f, 0x53, 0x10, 0x02, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x7a, 0x65, 0x6e, 0x69, + 0x74, 0x68, 0x2f, 0x44, 0x6f, 0x75, 0x54, 0x6f, 0x6b, 0x2f, 0x2e, 0x2e, 0x2e, 0x3b, 0x61, 0x70, + 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_trade_entities_proto_rawDescOnce sync.Once + file_trade_entities_proto_rawDescData = file_trade_entities_proto_rawDesc +) + +func file_trade_entities_proto_rawDescGZIP() []byte { + file_trade_entities_proto_rawDescOnce.Do(func() { + file_trade_entities_proto_rawDescData = protoimpl.X.CompressGZIP(file_trade_entities_proto_rawDescData) + }) + return file_trade_entities_proto_rawDescData +} + +var file_trade_entities_proto_enumTypes = make([]protoimpl.EnumInfo, 17) +var file_trade_entities_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_trade_entities_proto_goTypes = []interface{}{ + (TradeBizType)(0), // 0: api.TradeBizType + (TradeSaleWay)(0), // 1: api.TradeSaleWay + (TradePaySequence)(0), // 2: api.TradePaySequence + (TradeGoodsType)(0), // 3: api.TradeGoodsType + (TradeOrderStatusEnum)(0), // 4: api.TradeOrderStatusEnum + (PayType)(0), // 5: api.PayType + (TradePromotionType)(0), // 6: api.TradePromotionType + (DeliveryType)(0), // 7: api.DeliveryType + (DeliveryCompany)(0), // 8: api.DeliveryCompany + (CloseType)(0), // 9: api.CloseType + (PayScene)(0), // 10: api.PayScene + (PayPhase)(0), // 11: api.PayPhase + (PayChannel)(0), // 12: api.PayChannel + (PayStatus)(0), // 13: api.PayStatus + (TradeOrderRelation)(0), // 14: api.TradeOrderRelation + (RefundOrderType)(0), // 15: api.RefundOrderType + (RefundOrderStatus)(0), // 16: api.RefundOrderStatus + (*TradeParticipant)(nil), // 17: api.TradeParticipant + (*TradePromotion)(nil), // 18: api.TradePromotion + (*DeliveryInfo)(nil), // 19: api.DeliveryInfo + (*TimeoutInfo)(nil), // 20: api.TimeoutInfo + (*PaymentInfo)(nil), // 21: api.PaymentInfo + (*RefundOrder)(nil), // 22: api.RefundOrder + (*TradeOrder)(nil), // 23: api.TradeOrder + nil, // 24: api.DeliveryInfo.ExtraEntry + nil, // 25: api.TradeOrder.ExtraEntry +} +var file_trade_entities_proto_depIdxs = []int32{ + 6, // 0: api.TradePromotion.promotion_type:type_name -> api.TradePromotionType + 7, // 1: api.DeliveryInfo.delivery_type:type_name -> api.DeliveryType + 8, // 2: api.DeliveryInfo.delivery_company:type_name -> api.DeliveryCompany + 24, // 3: api.DeliveryInfo.extra:type_name -> api.DeliveryInfo.ExtraEntry + 10, // 4: api.PaymentInfo.pay_scene:type_name -> api.PayScene + 11, // 5: api.PaymentInfo.pay_phase:type_name -> api.PayPhase + 12, // 6: api.PaymentInfo.pay_channel:type_name -> api.PayChannel + 13, // 7: api.PaymentInfo.pay_status:type_name -> api.PayStatus + 15, // 8: api.RefundOrder.refund_type:type_name -> api.RefundOrderType + 16, // 9: api.RefundOrder.refund_status:type_name -> api.RefundOrderStatus + 0, // 10: api.TradeOrder.biz_type:type_name -> api.TradeBizType + 1, // 11: api.TradeOrder.sale_way:type_name -> api.TradeSaleWay + 2, // 12: api.TradeOrder.pay_sequence:type_name -> api.TradePaySequence + 3, // 13: api.TradeOrder.goods_type:type_name -> api.TradeGoodsType + 4, // 14: api.TradeOrder.order_status:type_name -> api.TradeOrderStatusEnum + 17, // 15: api.TradeOrder.buyer:type_name -> api.TradeParticipant + 17, // 16: api.TradeOrder.seller:type_name -> api.TradeParticipant + 5, // 17: api.TradeOrder.pay_type:type_name -> api.PayType + 18, // 18: api.TradeOrder.promotions:type_name -> api.TradePromotion + 19, // 19: api.TradeOrder.delivery_info:type_name -> api.DeliveryInfo + 20, // 20: api.TradeOrder.timeout_info:type_name -> api.TimeoutInfo + 9, // 21: api.TradeOrder.close_type:type_name -> api.CloseType + 23, // 22: api.TradeOrder.sub_order:type_name -> api.TradeOrder + 21, // 23: api.TradeOrder.payments:type_name -> api.PaymentInfo + 25, // 24: api.TradeOrder.extra:type_name -> api.TradeOrder.ExtraEntry + 14, // 25: api.TradeOrder.trade_order_relation:type_name -> api.TradeOrderRelation + 22, // 26: api.TradeOrder.refunds:type_name -> api.RefundOrder + 27, // [27:27] is the sub-list for method output_type + 27, // [27:27] is the sub-list for method input_type + 27, // [27:27] is the sub-list for extension type_name + 27, // [27:27] is the sub-list for extension extendee + 0, // [0:27] is the sub-list for field type_name +} + +func init() { file_trade_entities_proto_init() } +func file_trade_entities_proto_init() { + if File_trade_entities_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_trade_entities_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TradeParticipant); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_trade_entities_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TradePromotion); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_trade_entities_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeliveryInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_trade_entities_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TimeoutInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_trade_entities_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PaymentInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_trade_entities_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefundOrder); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_trade_entities_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TradeOrder); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_trade_entities_proto_rawDesc, + NumEnums: 17, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_trade_entities_proto_goTypes, + DependencyIndexes: file_trade_entities_proto_depIdxs, + EnumInfos: file_trade_entities_proto_enumTypes, + MessageInfos: file_trade_entities_proto_msgTypes, + }.Build() + File_trade_entities_proto = out.File + file_trade_entities_proto_rawDesc = nil + file_trade_entities_proto_goTypes = nil + file_trade_entities_proto_depIdxs = nil +} diff --git a/backend/baseService/api/trade_entities.proto b/backend/baseService/api/trade_entities.proto index e3b1dda..9646a15 100644 --- a/backend/baseService/api/trade_entities.proto +++ b/backend/baseService/api/trade_entities.proto @@ -63,6 +63,10 @@ message TradePromotion { int64 promotion_id = 1; // 优惠id string promotion_name = 2; // 优惠名称 uint64 promotion_amount = 3; // 优惠金额 单位:分 + string decrption = 4; // 描述 + TradePromotionType promotion_type = 5; // 优惠类型 + int64 entry_id = 6; // 优惠总类id + int64 account_id = 7; // 所属账户id } enum DeliveryType { @@ -176,14 +180,15 @@ enum RefundOrderStatus { message RefundOrder { int64 refund_id = 1; // 退款单id int64 order_id = 2; // 交易单id - int64 refund_amount = 3; // 退款金额 单位:分 - int64 refund_time = 4; // 退款时间 - int64 create_time = 5; // 创建时间 - int64 update_time = 6; // 更新时间 - int64 close_time = 7; // 关闭时间 - string refund_reason = 8; // 退款原因 - RefundOrderType refund_type = 9; // 退款类型 - RefundOrderStatus refund_status = 10; // 退款状态 + int64 payment_id = 3; // 支付信息id + int64 refund_amount = 4; // 退款金额 单位:分 + int64 refund_time = 5; // 退款时间 + int64 create_time = 6; // 创建时间 + int64 update_time = 7; // 更新时间 + int64 close_time = 8; // 关闭时间 + string refund_reason = 9; // 退款原因 + RefundOrderType refund_type = 10; // 退款类型 + RefundOrderStatus refund_status = 11; // 退款状态 } // 交易单 diff --git a/backend/baseService/api/trade_grpc.pb.go b/backend/baseService/api/trade_grpc.pb.go new file mode 100644 index 0000000..dcddc6f --- /dev/null +++ b/backend/baseService/api/trade_grpc.pb.go @@ -0,0 +1,319 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v5.27.1 +// source: trade.proto + +package api + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// TradeServiceClient is the client API for TradeService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type TradeServiceClient interface { + QueryTradeOrder(ctx context.Context, in *QueryTradeOrderRequest, opts ...grpc.CallOption) (*QueryTradeOrderResponse, error) + TradeCreate(ctx context.Context, in *TradeCreateRequest, opts ...grpc.CallOption) (*TradeCreateResponse, error) + MergeTrade(ctx context.Context, in *MergeTradeRequest, opts ...grpc.CallOption) (*MergeTradeResponse, error) + UpdateExtendInfo(ctx context.Context, in *UpdateExtendInfoRequest, opts ...grpc.CallOption) (*UpdateExtendInfoResponse, error) + UpdateTradeOrderStatus(ctx context.Context, in *UpdateTradeOrderStatusRequest, opts ...grpc.CallOption) (*UpdateTradeOrderStatusResponse, error) + UpdateDeliveryInfo(ctx context.Context, in *UpdateDeliveryInfoRequest, opts ...grpc.CallOption) (*UpdateDeliveryInfoResponse, error) + AddSubOrder(ctx context.Context, in *AddSubOrderRequest, opts ...grpc.CallOption) (*AddSubOrderResponse, error) +} + +type tradeServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewTradeServiceClient(cc grpc.ClientConnInterface) TradeServiceClient { + return &tradeServiceClient{cc} +} + +func (c *tradeServiceClient) QueryTradeOrder(ctx context.Context, in *QueryTradeOrderRequest, opts ...grpc.CallOption) (*QueryTradeOrderResponse, error) { + out := new(QueryTradeOrderResponse) + err := c.cc.Invoke(ctx, "/api.TradeService/QueryTradeOrder", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tradeServiceClient) TradeCreate(ctx context.Context, in *TradeCreateRequest, opts ...grpc.CallOption) (*TradeCreateResponse, error) { + out := new(TradeCreateResponse) + err := c.cc.Invoke(ctx, "/api.TradeService/TradeCreate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tradeServiceClient) MergeTrade(ctx context.Context, in *MergeTradeRequest, opts ...grpc.CallOption) (*MergeTradeResponse, error) { + out := new(MergeTradeResponse) + err := c.cc.Invoke(ctx, "/api.TradeService/MergeTrade", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tradeServiceClient) UpdateExtendInfo(ctx context.Context, in *UpdateExtendInfoRequest, opts ...grpc.CallOption) (*UpdateExtendInfoResponse, error) { + out := new(UpdateExtendInfoResponse) + err := c.cc.Invoke(ctx, "/api.TradeService/UpdateExtendInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tradeServiceClient) UpdateTradeOrderStatus(ctx context.Context, in *UpdateTradeOrderStatusRequest, opts ...grpc.CallOption) (*UpdateTradeOrderStatusResponse, error) { + out := new(UpdateTradeOrderStatusResponse) + err := c.cc.Invoke(ctx, "/api.TradeService/UpdateTradeOrderStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tradeServiceClient) UpdateDeliveryInfo(ctx context.Context, in *UpdateDeliveryInfoRequest, opts ...grpc.CallOption) (*UpdateDeliveryInfoResponse, error) { + out := new(UpdateDeliveryInfoResponse) + err := c.cc.Invoke(ctx, "/api.TradeService/UpdateDeliveryInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tradeServiceClient) AddSubOrder(ctx context.Context, in *AddSubOrderRequest, opts ...grpc.CallOption) (*AddSubOrderResponse, error) { + out := new(AddSubOrderResponse) + err := c.cc.Invoke(ctx, "/api.TradeService/AddSubOrder", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TradeServiceServer is the server API for TradeService service. +// All implementations should embed UnimplementedTradeServiceServer +// for forward compatibility +type TradeServiceServer interface { + QueryTradeOrder(context.Context, *QueryTradeOrderRequest) (*QueryTradeOrderResponse, error) + TradeCreate(context.Context, *TradeCreateRequest) (*TradeCreateResponse, error) + MergeTrade(context.Context, *MergeTradeRequest) (*MergeTradeResponse, error) + UpdateExtendInfo(context.Context, *UpdateExtendInfoRequest) (*UpdateExtendInfoResponse, error) + UpdateTradeOrderStatus(context.Context, *UpdateTradeOrderStatusRequest) (*UpdateTradeOrderStatusResponse, error) + UpdateDeliveryInfo(context.Context, *UpdateDeliveryInfoRequest) (*UpdateDeliveryInfoResponse, error) + AddSubOrder(context.Context, *AddSubOrderRequest) (*AddSubOrderResponse, error) +} + +// UnimplementedTradeServiceServer should be embedded to have forward compatible implementations. +type UnimplementedTradeServiceServer struct { +} + +func (UnimplementedTradeServiceServer) QueryTradeOrder(context.Context, *QueryTradeOrderRequest) (*QueryTradeOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryTradeOrder not implemented") +} +func (UnimplementedTradeServiceServer) TradeCreate(context.Context, *TradeCreateRequest) (*TradeCreateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TradeCreate not implemented") +} +func (UnimplementedTradeServiceServer) MergeTrade(context.Context, *MergeTradeRequest) (*MergeTradeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MergeTrade not implemented") +} +func (UnimplementedTradeServiceServer) UpdateExtendInfo(context.Context, *UpdateExtendInfoRequest) (*UpdateExtendInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateExtendInfo not implemented") +} +func (UnimplementedTradeServiceServer) UpdateTradeOrderStatus(context.Context, *UpdateTradeOrderStatusRequest) (*UpdateTradeOrderStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateTradeOrderStatus not implemented") +} +func (UnimplementedTradeServiceServer) UpdateDeliveryInfo(context.Context, *UpdateDeliveryInfoRequest) (*UpdateDeliveryInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateDeliveryInfo not implemented") +} +func (UnimplementedTradeServiceServer) AddSubOrder(context.Context, *AddSubOrderRequest) (*AddSubOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddSubOrder not implemented") +} + +// UnsafeTradeServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TradeServiceServer will +// result in compilation errors. +type UnsafeTradeServiceServer interface { + mustEmbedUnimplementedTradeServiceServer() +} + +func RegisterTradeServiceServer(s grpc.ServiceRegistrar, srv TradeServiceServer) { + s.RegisterService(&TradeService_ServiceDesc, srv) +} + +func _TradeService_QueryTradeOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTradeOrderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TradeServiceServer).QueryTradeOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.TradeService/QueryTradeOrder", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TradeServiceServer).QueryTradeOrder(ctx, req.(*QueryTradeOrderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TradeService_TradeCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TradeCreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TradeServiceServer).TradeCreate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.TradeService/TradeCreate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TradeServiceServer).TradeCreate(ctx, req.(*TradeCreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TradeService_MergeTrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MergeTradeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TradeServiceServer).MergeTrade(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.TradeService/MergeTrade", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TradeServiceServer).MergeTrade(ctx, req.(*MergeTradeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TradeService_UpdateExtendInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateExtendInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TradeServiceServer).UpdateExtendInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.TradeService/UpdateExtendInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TradeServiceServer).UpdateExtendInfo(ctx, req.(*UpdateExtendInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TradeService_UpdateTradeOrderStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateTradeOrderStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TradeServiceServer).UpdateTradeOrderStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.TradeService/UpdateTradeOrderStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TradeServiceServer).UpdateTradeOrderStatus(ctx, req.(*UpdateTradeOrderStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TradeService_UpdateDeliveryInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateDeliveryInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TradeServiceServer).UpdateDeliveryInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.TradeService/UpdateDeliveryInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TradeServiceServer).UpdateDeliveryInfo(ctx, req.(*UpdateDeliveryInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TradeService_AddSubOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddSubOrderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TradeServiceServer).AddSubOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.TradeService/AddSubOrder", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TradeServiceServer).AddSubOrder(ctx, req.(*AddSubOrderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// TradeService_ServiceDesc is the grpc.ServiceDesc for TradeService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var TradeService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.TradeService", + HandlerType: (*TradeServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "QueryTradeOrder", + Handler: _TradeService_QueryTradeOrder_Handler, + }, + { + MethodName: "TradeCreate", + Handler: _TradeService_TradeCreate_Handler, + }, + { + MethodName: "MergeTrade", + Handler: _TradeService_MergeTrade_Handler, + }, + { + MethodName: "UpdateExtendInfo", + Handler: _TradeService_UpdateExtendInfo_Handler, + }, + { + MethodName: "UpdateTradeOrderStatus", + Handler: _TradeService_UpdateTradeOrderStatus_Handler, + }, + { + MethodName: "UpdateDeliveryInfo", + Handler: _TradeService_UpdateDeliveryInfo_Handler, + }, + { + MethodName: "AddSubOrder", + Handler: _TradeService_AddSubOrder_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "trade.proto", +} From c61240c845c6a194f94b56074806db7b55893039 Mon Sep 17 00:00:00 2001 From: TremblingV5 Date: Sat, 16 Nov 2024 21:20:59 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BC=98=E6=83=A0?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/baseService/api/promotion.proto | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/backend/baseService/api/promotion.proto b/backend/baseService/api/promotion.proto index 226c02e..bb2bcca 100644 --- a/backend/baseService/api/promotion.proto +++ b/backend/baseService/api/promotion.proto @@ -12,6 +12,7 @@ service PromotionService { rpc PromotionQuery(PromotionQueryRequest) returns (PromotionQueryResponse); // 查询促销信息 rpc PromotionUpdate(PromotionUpdateRequest) returns (PromotionUpdateResponse); // 更新促销信息 rpc PromotionDelete(PromotionDeleteRequest) returns (PromotionDeleteResponse); // 删除促销信息 + rpc CreateSpecificPromotion(CreateSpecificPromotionRequest) returns (CreateSpecificPromotionResponse); // 创建特定促销信息 rpc QuerySpecificPromotion(QuerySpecificPromotionRequest) returns (QuerySpecificPromotionResponse); // 查询特定促销信息 rpc Calculate(CalculateRequest) returns (CalculateResponse); // 计算优惠结果 } @@ -65,6 +66,16 @@ message PromotionDeleteResponse { api.Metadata meta = 1; } +message CreateSpecificPromotionRequest { + int64 promotion_id = 1; // 优惠信息id + repeated int64 account_id = 2; // 账户id + int64 expire_time = 3; // 过期时间 +} + +message CreateSpecificPromotionResponse { + api.Metadata meta = 1; +} + message QuerySpecificPromotionItem { int64 id = 1; // 优惠信息id int64 account_id = 2; // 账户id