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.
204 lines
5.4 KiB
204 lines
5.4 KiB
syntax = "proto3"; |
|
|
|
package av.v0; |
|
|
|
option go_package = "v0"; |
|
|
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto"; |
|
|
|
service PayGoods { |
|
|
|
/** 生成一张付费直播票 |
|
* |
|
*/ |
|
rpc add (PayGoodsAddReq) returns (PayGoodsAddResp); |
|
|
|
/** 更新一张付费直播票 |
|
* |
|
*/ |
|
rpc update (PayGoodsUpdateReq) returns (PayGoodsUpdateResp); |
|
|
|
/** 获取付费直播票列表 |
|
* |
|
*/ |
|
rpc getList (PayGoodsGetListReq) returns (PayGoodsGetListResp); |
|
|
|
/** 关闭购票 |
|
* |
|
*/ |
|
rpc close (PayGoodsCloseReq) returns (PayGoodsCloseResp); |
|
|
|
/** 开启购票 |
|
* |
|
*/ |
|
rpc open (PayGoodsOpenReq) returns (PayGoodsOpenResp); |
|
} |
|
|
|
|
|
|
|
message PayGoodsAddReq { |
|
// 平台 |
|
string platform = 1 [(gogoproto.jsontag) = "platform"]; |
|
// 商品名称 |
|
string title = 2 [(gogoproto.jsontag) = "title"]; |
|
// 商品类型 2 付费直播门票 |
|
int64 type = 3 [(gogoproto.jsontag) = "type"]; |
|
// 商品价格(分) |
|
int64 price = 4 [(gogoproto.jsontag) = "price"]; |
|
// 开始时间 |
|
string start_time = 5 [(gogoproto.jsontag) = "start_time"]; |
|
// 结束时间 |
|
string end_time = 6 [(gogoproto.jsontag) = "end_time"]; |
|
// ip限制,0不限制,1仅限大陆,2仅限港澳台,3大陆+港澳台 |
|
int64 ip_limit = 7 [(gogoproto.jsontag) = "ip_limit"]; |
|
} |
|
|
|
message PayGoodsAddResp { |
|
// 返回code |
|
int64 code = 1 [(gogoproto.jsontag) = "code"]; |
|
// 返回msg |
|
string msg = 2 [(gogoproto.jsontag) = "msg"]; |
|
// 返回data |
|
Data data = 3 [(gogoproto.jsontag) = "data"]; |
|
|
|
message Data { |
|
|
|
} |
|
} |
|
|
|
|
|
|
|
message PayGoodsUpdateReq { |
|
// 购票id |
|
int64 id = 1 [(gogoproto.jsontag) = "id"]; |
|
// 平台 |
|
string platform = 2 [(gogoproto.jsontag) = "platform"]; |
|
// 商品名称 |
|
string title = 3 [(gogoproto.jsontag) = "title"]; |
|
// 商品类型 2 付费直播门票 |
|
int64 type = 4 [(gogoproto.jsontag) = "type"]; |
|
// 商品价格(分) |
|
int64 price = 5 [(gogoproto.jsontag) = "price"]; |
|
// 开始时间 |
|
string start_time = 6 [(gogoproto.jsontag) = "start_time"]; |
|
// 结束时间 |
|
string end_time = 7 [(gogoproto.jsontag) = "end_time"]; |
|
// ip限制,0不限制,1仅限大陆,2仅限港澳台,3大陆+港澳台 |
|
int64 ip_limit = 8 [(gogoproto.jsontag) = "ip_limit"]; |
|
} |
|
|
|
message PayGoodsUpdateResp { |
|
// 返回code |
|
int64 code = 1 [(gogoproto.jsontag) = "code"]; |
|
// 返回msg |
|
string msg = 2 [(gogoproto.jsontag) = "msg"]; |
|
// 返回data |
|
Data data = 3 [(gogoproto.jsontag) = "data"]; |
|
|
|
message Data { |
|
|
|
} |
|
} |
|
|
|
|
|
|
|
message PayGoodsGetListReq { |
|
// 购票id |
|
int64 id = 1 [(gogoproto.jsontag) = "id"]; |
|
// 平台 |
|
string platform = 2 [(gogoproto.jsontag) = "platform"]; |
|
// 商品名称 |
|
string title = 3 [(gogoproto.jsontag) = "title"]; |
|
// 商品类型 2 付费直播门票 |
|
int64 type = 4 [(gogoproto.jsontag) = "type"]; |
|
// ip限制,0不限制,1仅限大陆,2仅限港澳台,3大陆+港澳台 |
|
int64 ip_limit = 5 [(gogoproto.jsontag) = "ip_limit"]; |
|
// 页号,0开始 |
|
int64 page_num = 6 [(gogoproto.jsontag) = "page_num"]; |
|
// 每页个数 |
|
int64 page_size = 7 [(gogoproto.jsontag) = "page_size"]; |
|
} |
|
|
|
message PayGoodsGetListResp { |
|
// 返回code |
|
int64 code = 1 [(gogoproto.jsontag) = "code"]; |
|
// 返回msg |
|
string msg = 2 [(gogoproto.jsontag) = "msg"]; |
|
// 返回data |
|
Data data = 3 [(gogoproto.jsontag) = "data"]; |
|
|
|
message PageInfo { |
|
// 记录总数 |
|
int64 total_count = 1 [(gogoproto.jsontag) = "total_count"]; |
|
// 当前页号 |
|
int64 page_num = 2 [(gogoproto.jsontag) = "page_num"]; |
|
} |
|
|
|
message GoodsInfo { |
|
// 购票id |
|
int64 id = 1 [(gogoproto.jsontag) = "id"]; |
|
// 标题 |
|
string title = 2 [(gogoproto.jsontag) = "title"]; |
|
// 平台 |
|
string platform = 3 [(gogoproto.jsontag) = "platform"]; |
|
// 类型,2为付费直播 |
|
int64 type = 4 [(gogoproto.jsontag) = "type"]; |
|
// 价格,分 |
|
int64 price = 5 [(gogoproto.jsontag) = "price"]; |
|
// 开始购票时间 |
|
string start_time = 6 [(gogoproto.jsontag) = "start_time"]; |
|
// 结束购票时间 |
|
string end_time = 7 [(gogoproto.jsontag) = "end_time"]; |
|
// ip限制 |
|
int64 ip_limit = 8 [(gogoproto.jsontag) = "ip_limit"]; |
|
// 购票状态,0关闭,1购票中,2未开始 |
|
int64 status = 9 [(gogoproto.jsontag) = "status"]; |
|
} |
|
|
|
message Data { |
|
// |
|
PageInfo page_info = 1 [(gogoproto.jsontag) = "page_info"]; |
|
// |
|
repeated GoodsInfo goods_info = 2 [(gogoproto.jsontag) = "goods_info"]; |
|
} |
|
} |
|
|
|
|
|
|
|
message PayGoodsCloseReq { |
|
// 购票id |
|
int64 id = 1 [(gogoproto.jsontag) = "id"]; |
|
} |
|
|
|
message PayGoodsCloseResp { |
|
// 返回code |
|
int64 code = 1 [(gogoproto.jsontag) = "code"]; |
|
// 返回msg |
|
string msg = 2 [(gogoproto.jsontag) = "msg"]; |
|
// 返回data |
|
Data data = 3 [(gogoproto.jsontag) = "data"]; |
|
|
|
message Data { |
|
|
|
} |
|
} |
|
|
|
|
|
|
|
message PayGoodsOpenReq { |
|
// 购票id |
|
int64 id = 1 [(gogoproto.jsontag) = "id"]; |
|
} |
|
|
|
message PayGoodsOpenResp { |
|
// 返回code |
|
int64 code = 1 [(gogoproto.jsontag) = "code"]; |
|
// 返回msg |
|
string msg = 2 [(gogoproto.jsontag) = "msg"]; |
|
// 返回data |
|
Data data = 3 [(gogoproto.jsontag) = "data"]; |
|
|
|
message Data { |
|
|
|
} |
|
} |