syntax = "proto3"; package api.chat; //import "google/api/annotations.proto"; //import "google/protobuf/struct.proto"; import "google/protobuf/empty.proto"; import "api/common/common.proto"; option go_package = "git.ikuban.com/server/pw-protobuf/api/chat;chat"; option java_multiple_files = true; option java_package = "api.chat"; service Chat { // 检查用户是否与接待员聊天 rpc CheckUserPartnerIsRelationship (common.UserAndPartnerIdentifyIdParam) returns (CheckUserPartnerIsRelationshipReply); // 创建聊天房间 rpc CreateChatRoom (CreateChatRoomParam) returns (RoomReply); // 查询在线人的列表 rpc FindOnlinePersonList (common.ListPageAndPersonRequest) returns (common.OnlinePersonListReply); // 接待员查询房间列表 rpc PartnerFindRoomList (PartnerFindRoomListRequest) returns (PartnerFindRoomListReply){}; // 用户查询房间列表 rpc UserFindRoomList (UserFindRoomListRequest) returns (UserFindRoomListReply){}; rpc Receive (ReceiveRequest) returns (ReceiveReply){}; // 查询聊天记录 rpc FindChatRecordList (FindChatRecordListRequest) returns (common.ChatRecordListReply){}; // 房间信息 rpc FindChatRoomMsg (FindChatRoomMsgRequest) returns (common.ChatRoomMsg){}; // 拉黑 rpc SetBlackChat (SetBlackChatParam) returns (google.protobuf.Empty){}; // 拉黑 rpc Report (common.ReportRequest) returns (google.protobuf.Empty){}; // 接待员领取开通奖励 rpc PartnerGetAward (PartnerGetAwardRequest) returns (PartnerGetAwardReply){}; // 房间信息 rpc FindRoomCardMsg (FindRoomCardMsgRequest) returns (common.RoomChatMsg){}; } message FindRoomCardMsgRequest{ string userIdentifyId = 1; // 身份ID string partnerIdentifyId = 2; // 身份ID } message PartnerGetAwardReply { int64 balance = 1; } message PartnerGetAwardRequest{ string userIdentifyId = 1; // 身份ID string partnerIdentifyId = 2; // 身份ID string awardType = 3; } message PartnerFindRoomListRequest { int64 nextId = 1; int64 offset = 2; string IdentifyId = 3; bool isFindNotReply = 4; // 是否查询没回复过的内容 bool isWithinSevenDay = 5; // 是否在七日内 } message UserFindRoomListRequest { int64 nextId = 1; int64 offset = 2; string IdentifyId = 3; bool isWithinSevenDay = 4; // 是否在七日内 } message UserFindRoomListReply{ repeated UserRoomInfo list = 1; int64 nextId = 2; } message UserRoomInfo{ string personType = 1;// 用户类型 string personId = 2;// 用户ID int64 unreadNum = 3;// 用户未读数 string lastContent = 4;// 上次发送内容 int64 lastTime = 5;// 上次发送时间 int64 likeability = 6;// 好感度 int64 roomId = 7; // 房间ID } message PartnerFindRoomListReply{ repeated PartnerRoomInfo list = 1; int64 nextId = 2; } message PartnerRoomInfo{ int64 personSendNum = 1;// 用户发送数 string personId = 2;// 用户ID int64 unreadNum = 3;// 接待者未读数 string lastContent = 4;// 上次发送内容 int64 lastTime = 5;// 上次发送时间 int64 benefit = 6;// 收益 string type = 7;// 类型(新客:new,付费:pay) int64 sex = 8;// 性别 string avatarUrl = 9;// 头像 string nickname = 10;// 昵称 int64 age = 11;// 年龄 int64 likeability = 12;// 好感度 int64 roomId = 13;// 房间号ID int64 personSendBaseNum = 14;// 用户发送基数 } message CreateChatRoomParam { string personId1 = 1; string personIdentifyID1 = 2; // 身份ID string personType1 = 3; // 类型 string personId2 = 4; string personIdentifyID2 = 5; // 身份ID string personType2 = 6; // 类型 } message SetBlackChatParam { string personIdentifyId = 1; // 拉黑者的身份ID int64 roomId = 2; // 房间ID } message ReceiveRequest{ string method = 1; bytes data = 2; string id = 3; string websocketTag = 4; string personType = 5; string personId = 6; } message ReceiveReply{ } message CheckUserPartnerIsRelationshipReply{ bool isBuildRelationship = 1; int64 roomId = 2; } message RoomReply{ int64 roomId = 1; } message FindChatRoomMsgRequest{ int64 roomId = 1; string personType = 2; // 类型 string personID = 3; // 查询目标的ID } message FindChatRecordListRequest{ int64 nextId = 1; int64 offset = 2; int64 roomId = 3; string personType = 4; // 类型 string personID = 5; // 查询目标的ID }