39 lines
836 B
Protocol Buffer
39 lines
836 B
Protocol Buffer
syntax = "proto2";
|
|
import "XiguaUser.proto";
|
|
import "XiguaGift.proto";
|
|
message Message {
|
|
required CommonInfo commonInfo = 1;
|
|
optional string content = 3;
|
|
}
|
|
// 样式
|
|
message Style {
|
|
optional string color = 1;
|
|
optional int32 fontWeight = 4;
|
|
}
|
|
// 参数
|
|
message Params {
|
|
// 1 字符串
|
|
// 11 用户
|
|
// 12 礼物
|
|
required int32 type = 1;
|
|
optional Style style = 2;
|
|
optional string string = 11;
|
|
optional UserPack users = 21;
|
|
optional GiftPack gifts = 22;
|
|
}
|
|
// 自定义显示信息
|
|
message DisplayText {
|
|
// 参数
|
|
required string method = 1;
|
|
required string format = 2;
|
|
optional Style bgStyle = 3;
|
|
required Params params = 4;
|
|
}
|
|
// 通用定义
|
|
message CommonInfo {
|
|
optional string method = 1;
|
|
optional int32 msg_id = 2;
|
|
optional int32 room_id = 3;
|
|
optional int32 create_time = 4;
|
|
optional DisplayText displayText = 8;
|
|
} |