优惠券rpc数据结构及方法
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
463 B

syntax = "proto3";
package couponrpc;
// 是否可用请求结构
message CouponRequest {
string data = 1;
string time = 2;
string sign = 3;
}
// 是否可用响应结构
message CouponResponse {
string data = 1;
string time = 2;
string sign = 3;
}
// rpc方法
service CouponService {
rpc isAvailable (CouponRequest) returns (CouponResponse); // 优惠券是否可用
rpc use (CouponRequest) returns (CouponResponse); // 使用优惠券
}