syntax = "proto3"; package pb; option go_package = "/pb"; import "commands.proto"; /* 聊天信息 */ message ChatMsg { string client_id = 1; // 接收者id string input = 2; // 输入内容 } /* 玩家基本信息 */ message IdInfo { string id = 1; // id int32 game_id = 2; // game id } message ArrayIdInfo { repeated IdInfo id_infos = 1; } /* 聊天记录 */ message ChatLog { string content = 3; // 聊天内容 int64 time_stamp = 4; // 时间戳 int32 game_id = 5; // 游戏id bool from_player = 6; // 是否是玩家发言 } message ArrayChatLog { repeated ChatLog data_list = 1; } /* 命令消息 */ message CommandMsg { ECommand cmd_type = 1; // 命令类型 int32 cmd_val = 2; // 通用val string cmd_str = 3; // 通用str oneof buff { ChatMsg chat_msg = 4; IdInfo id_info = 5; ArrayIdInfo array_id_info = 6; ArrayChatLog array_chat_log = 7; } }