204 lines
5.4 KiB
Protocol Buffer
Raw Normal View History

2019-04-22 02:59:20 +00:00
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 {
}
}