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.
78 lines
2.0 KiB
78 lines
2.0 KiB
syntax = "proto3"; |
|
|
|
package room.v1; |
|
|
|
option go_package = "v1"; |
|
|
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto"; |
|
|
|
service Area { |
|
|
|
/** 获取父分区列表 |
|
* |
|
*/ |
|
rpc getParentList (AreaGetParentListReq) returns (AreaGetParentListResp); |
|
|
|
/** 获取分区详情 |
|
* |
|
*/ |
|
rpc getDetail (AreaGetDetailReq) returns (AreaGetDetailResp); |
|
} |
|
|
|
|
|
|
|
message AreaGetParentListReq { |
|
// 1播端 2看端 |
|
int64 source_id = 1 [(gogoproto.jsontag) = "source_id"]; |
|
} |
|
|
|
message AreaGetParentListResp { |
|
// code |
|
int64 code = 1 [(gogoproto.jsontag) = "code"]; |
|
// msg |
|
string msg = 2 [(gogoproto.jsontag) = "msg"]; |
|
// |
|
repeated Info data = 3 [(gogoproto.jsontag) = "data"]; |
|
|
|
message Info { |
|
// 父分区id |
|
int64 id = 1 [(gogoproto.jsontag) = "id"]; |
|
// 父分区名字 |
|
string name = 2 [(gogoproto.jsontag) = "name"]; |
|
} |
|
} |
|
|
|
|
|
|
|
message AreaGetDetailReq { |
|
// id表示二级分区id |
|
int64 id = 1 [(gogoproto.jsontag) = "id"]; |
|
} |
|
|
|
message AreaGetDetailResp { |
|
// code |
|
int64 code = 1 [(gogoproto.jsontag) = "code"]; |
|
// msg |
|
string msg = 2 [(gogoproto.jsontag) = "msg"]; |
|
// 分区详情信息 |
|
AreaInfo data = 3 [(gogoproto.jsontag) = "data"]; |
|
|
|
message AreaInfo { |
|
// 分区id |
|
string id = 1 [(gogoproto.jsontag) = "id"]; |
|
// 父分区id |
|
string parent_id = 2 [(gogoproto.jsontag) = "parent_id"]; |
|
// 对应的老分区id |
|
string old_area_id = 3 [(gogoproto.jsontag) = "old_area_id"]; |
|
// 分区名称 |
|
string name = 4 [(gogoproto.jsontag) = "name"]; |
|
// 父分区名称 |
|
string parent_name = 5 [(gogoproto.jsontag) = "parent_name"]; |
|
// 绑定的活动id |
|
string act_id = 6 [(gogoproto.jsontag) = "act_id"]; |
|
// 0 默认 1 最热 |
|
string hot_status = 7 [(gogoproto.jsontag) = "hot_status"]; |
|
// 分区图标 |
|
string pic = 8 [(gogoproto.jsontag) = "pic"]; |
|
} |
|
} |