syntax = "proto3"; package bite_im; import "base.proto"; option cc_generic_services = true; message GetHistoryMsgReq { string request_id = 1; string chat_session_id = 2; int64 start_time = 3; int64 over_time = 4; optional string user_id = 5; optional string session_id = 6; } message GetHistoryMsgRsp { string request_id = 1; bool success = 2; string errmsg = 3; repeated MessageInfo msg_list = 4; } message GetRecentMsgReq { string request_id = 1; string chat_session_id = 2; int64 msg_count = 3; optional int64 cur_time = 4;//用于扩展获取指定时间前的n条消息 optional string user_id = 5; optional string session_id = 6; } message GetRecentMsgRsp { string request_id = 1; bool success = 2; string errmsg = 3; repeated MessageInfo msg_list = 4; } message MsgSearchReq { string request_id = 1; optional string user_id = 2; optional string session_id = 3; string chat_session_id = 4; string search_key = 5; } message MsgSearchRsp { string request_id = 1; bool success = 2; string errmsg = 3; repeated MessageInfo msg_list = 4; } service MsgStorageService { rpc GetHistoryMsg(GetHistoryMsgReq) returns (GetHistoryMsgRsp); rpc GetRecentMsg(GetRecentMsgReq) returns (GetRecentMsgRsp); rpc MsgSearch(MsgSearchReq) returns (MsgSearchRsp); }