| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313 |
- 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.UserIDsParam) returns (CheckUserPartnerIsRelationshipReply);
- // 创建聊天房间
- rpc CreateChatRoom (CreateChatRoomParam) returns (RoomReply);
- // 查询在线人的列表
- rpc FindOnlinePersonList (common.ListPageAndPersonRequest) returns (common.RecommendPersonListReply);
- // 查询推荐人的列表
- rpc FindRecommendPersonList (FindRecommendPersonListRequest) returns (common.RecommendPersonListReply);
- // 接待员查询房间列表
- rpc PartnerFindRoomList (PartnerFindRoomListRequest) returns (PartnerFindRoomListReply){};
- // 用户查询房间列表
- rpc UserFindRoomList (UserFindRoomListRequest) returns (UserFindRoomListReply){};
- // websocket调用
- 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 DeleteChat (SetBlackChatParam) returns (google.protobuf.Empty){};
- // 拉黑
- rpc Report (common.ReportRequest) returns (google.protobuf.Empty){};
- // 房间信息
- rpc FindRoomCardMsg (FindRoomCardMsgRequest) returns (common.RoomChatMsg){};
- // 获取假弹窗
- rpc GetWindowInfo (common.MatchingRequest) returns (chat.WindowInfo){};
- // 随机匹配
- rpc GetRandomMatching (common.MatchingRequest) returns (GetRandomMatchingReply){};
- // 随机匹配接待员
- rpc GetMatchingPartnerInfo (GetMatchingPartnerInfoRequest) returns (common.GetMatchingPartnerInfoReply){};
- // 精确匹配用户
- rpc AccurateMatchingUserInfo (AccurateMatchingUserInfoRequest) returns (common.GetMatchingPartnerInfoReply){};
- // 接待员收藏某条记录
- rpc PartnerCollect (PartnerCollectIDsRequest) returns (google.protobuf.Empty){};
- // 接待员取消收藏某条记录
- rpc PartnerDeleteCollect (PartnerCollectRequest) returns (google.protobuf.Empty){};
- // 查询接待员在本房间的收藏列表
- rpc FindChatCollectList (FindChatRecordListRequest) returns (common.ChatRecordListReply){};
- // 用户解锁语音
- rpc UserUnlockVoice (UserUnlockRequest) returns (google.protobuf.Empty){};
- // 用户解锁图片
- rpc UserUnlockPicture (UserUnlockRequest) returns (google.protobuf.Empty){};
- // 获取房间的接待员收益
- rpc GetRoomProfit (common.RoomIDRequest) returns (GetRoomProfitReply){};
- // 获取在线人数
- rpc GetOnlinePersonNum (google.protobuf.Empty) returns (GetOnlinePersonNumReply){};
- // 查询用户全部的未读数
- rpc FindUserAllUnreadNum (common.PersonIDParam) returns (UnreadNumReply){};
- // 用户查询与某人的房间
- rpc GetUserRoomByPerson (common.UserIDsParam) returns (UserRoomInfo){};
- // 用户查询对某人是否是超级喜欢
- rpc GetSuperLoveByPerson (common.UserIDsParam) returns (UserSuperLoveInfo){};
- // 管理员查询房间列表
- rpc ManagerFindRoomList (common.ManagerFindRoomListRequest) returns (common.ManagerFindRoomListReply){};
- // 管理员查询聊天记录
- rpc ManagerFindChatRecordList (common.ManagerFindChatRecordListRequest) returns (common.ChatRecordListReply){};
- // 管理员查询举报列表
- rpc ManagerFindReportList (common.ManagerFindReportListRequest) returns (common.ManagerFindReportListReply){};
- // 管理员查询某个举报者的举报详情列表
- rpc ManagerFindReportDetailsList (common.ManagerFindReportDetailsListRequest) returns (common.ManagerFindReportDetailsListReply){};
- // 发送消息
- rpc SendMessage (SendMessageRequest) returns (common.SendMessageReply){};
- // 小纸条创建房间
- rpc ScripCreateRoom (ScripCreateRoomRequest) returns (common.ChatRecordInfo){};
- // 清除用户的未读数
- rpc CleanUserUnReadNum (common.PersonIDParam) returns (google.protobuf.Empty){};
- }
- message ScripCreateRoomRequest{
- int64 scripId = 1;
- string msgType = 2; // 消息类型
- common.Message message = 3; // 消息的结构
- string myPersonId = 4;
- string scripPersonId = 5;
- string text = 6;
- string pictureUrl = 7;
- }
- message SendMessageRequest{
- int64 roomId = 1;// 房间ID
- common.Message message = 2;// 消息
- string msgType = 3;// 消息类型
- string personId = 4;// 发送人的ID
- string websocketTag = 5;
- bool isMiniProgram = 6;
- string appId = 7;
- string openId = 8;
- bool isOldVersion = 9;
- }
- message GetOnlinePersonNumReply{
- int64 num = 1;
- }
- message GetMatchingPartnerInfoRequest{
- int64 sex = 1;// 性别
- string userID = 2; // 用户ID
- string openId = 4;
- string appId = 5;
- }
- message AccurateMatchingUserInfoRequest{
- int64 sex = 1;// 性别
- string userID = 2; // 用户ID
- string openId = 4;
- string appId = 5;
- string province = 7;// 省
- string city = 8;// 市
- int64 maxAge = 9;// 最大年龄
- int64 minAge = 10;// 最小年龄
- }
- message GetRoomProfitReply{
- int64 roomProfit = 1;// 房间收益
- }
- message UserUnlockRequest{
- int64 roomId = 1;// 房间ID
- string personId = 2;
- }
- message PartnerCollectIDsRequest{
- repeated int64 chatRecordIds = 1;// 记录ID
- string personId = 2;
- int64 roomId = 5;// 房间ID
- }
- message PartnerCollectRequest{
- int64 chatRecordId = 1;// 记录ID
- string personId = 2;
- string identifyId = 4;
- }
- message GetRandomMatchingReply{
- string personID = 1; // 查询目标的ID
- int64 roomId = 3; // 房间ID
- string nickname = 4;// 昵称
- string avatarUrl = 5;// 头像
- int64 sex = 6;// 性别
- int64 age = 7;// 年龄
- }
- message FindNotReplyNumReply{
- int64 personNum = 1;// 未接待人数
- int64 messageNum = 2;// 消息数
- }
- message UnreadNumReply{
- int64 unreadNum = 1;// 未读数
- }
- message FindRecommendPersonListRequest{
- int64 num = 1;// 推荐数
- bool isRefresh = 2; // 是否刷新
- string personID = 3; // 查询目标的ID
- }
- message FindRoomCardMsgRequest{
- string userId = 1; // 身份ID
- string partnerId = 2; // 身份ID
- }
- message PartnerGetAwardReply {
- int64 balance = 1;
- }
- message PartnerFindRoomListRequest {
- int64 nextId = 1;
- int64 offset = 2;
- string personId = 3;
- bool isFindNotReply = 4; // 是否查询没回复过的内容
- bool isWithinSevenDay = 5; // 是否在七日内
- }
- message UserFindRoomListRequest {
- int64 nextId = 1;
- int64 offset = 2;
- string personId = 3;
- bool isWithinSevenDay = 4; // 是否在七日内
- bool isCloseFriend = 5; // 是否是密友
- }
- message UserFindRoomListReply{
- repeated UserRoomInfo list = 1;
- int64 nextId = 2;
- }
- message UserRoomInfo{
- string personId = 2;// 用户ID
- int64 unreadNum = 3;// 用户未读数
- string lastContent = 4;// 上次发送内容
- int64 lastTime = 5;// 上次发送时间
- int64 likeability = 6;// 好感度
- int64 roomId = 7; // 房间ID
- }
- message UserSuperLoveInfo{
- bool isSuperLove = 1;
- }
- 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 personId2 = 4;
- string source = 7;// 来源
- }
- message SetBlackChatParam {
- string personId = 1; // 拉黑者的身份ID
- int64 roomId = 2; // 房间ID
- }
- message ReceiveRequest{
- string method = 1;
- bytes data = 2;
- string id = 3;
- string websocketTag = 4;
- string personId = 6;
- }
- message ReceiveReply{
- }
- message CheckUserPartnerIsRelationshipReply{
- bool isBuildRelationship = 1;
- int64 roomId = 2;
- }
- message RoomReply{
- int64 roomId = 1;
- }
- message FindChatRoomMsgRequest{
- int64 roomId = 1;
- string personID = 3; // 查询目标的ID
- }
- message FindChatRecordListRequest{
- int64 nextId = 1;
- int64 offset = 2;
- int64 roomId = 3;
- string personID = 5; // 查询目标的ID
- }
- message WindowInfo{
- string content = 1; // 文本内容
- int64 roomId = 2; // 房间ID
- string avatarUrl = 3;// 头像
- string nickname = 4;// 昵称
- int64 age = 5;// 年龄
- int64 sex = 6;// 性别
- repeated string reply = 7;// 快捷回复
- bool isVip = 19;// 是否是Vip
- int64 vipLevel = 20;// vip等级
- bool isYearVip = 21;// 是否是年费Vip
- repeated string vipFunctions = 22;// vip功能
- bool isCertification = 26;// 是否实名认证
- }
- message ReminderInfo{
- int64 num = 1;// 发送条数
- int64 limitNum = 2;// 上限条数
- int64 sendTime = 3;// 发送时间
- int64 roomId = 4;// 房间ID
- }
- message ReminderUserInfo{
- int64 roomId = 1;// 房间ID
- }
- message UpLikeabilityInfo{
- int64 likeability = 1;// 好感度
- int64 roomId = 2;// 房间ID
- }
|