| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- 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.UserAndPartnerIdParam) returns (CheckUserPartnerIsRelationshipReply);
- // 创建聊天房间
- rpc CreateChatRoom (CreateChatRoomParam) returns (RoomReply);
- // 查询在线人的列表
- rpc FindOnlinePersonList (common.ListPageAndPersonRequest) returns (common.OnlinePersonListReply);
- // 接待员查询房间列表
- rpc PartnerFindRoomList (PartnerFindRoomListRequest) returns (PartnerFindRoomListReply){};
- rpc Receive (ReceiveRequest) returns (ReceiveReply){};
- }
- message PartnerFindRoomListRequest {
- int64 nextId = 1;
- int64 offset = 2;
- string IdentifyId = 3;
- bool isFindNotReply = 4; // 是否查询没回复过的内容
- bool isWithinSevenDay = 5; // 是否在七日内
- }
- 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;// 上次发送时间
- string nickname = 6;// 昵称
- string AvatarUrl = 7;// 头像
- int64 sex = 8;// 性别
- string type = 9;// 类型(新客:new,付费:pay)
- int64 benefit = 10;// 收益
- }
- message CreateChatRoomParam {
- string personId1 = 1;
- string personIdentifyID1 = 2; // 身份ID
- string personType1 = 3; // 类型
- string personId2 = 4;
- string personIdentifyID2 = 5; // 身份ID
- string personType2 = 6; // 类型
- }
- 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;
- }
|