syntax = "proto3";
option go_package = ".;pb";

message FriendBase {
  string userId = 1;     // ID
  string NickName = 2;   //昵称
  int32 level = 3;       //等级
  int32 avatar = 4;      //头像
  int64 strength = 5;    //战力
  int32 serverId = 6;    //服务编号
  int64 offlineTime = 7; //最近一次下线时间 0在线
}

//好友列表
message FriendListReq {}

message FriendListResp { repeated FriendBase list = 1; }

//申请好友
message FriendApplyReq {
  string friendId = 1; //好友ID
}
message FriendApplyResp {
  string userId = 1;   //用户ID
  string friendId = 2; //好友ID
}

//删除好友
message FriendDelReq {
  string friendId = 1; //好友ID
}

message FriendDelResp {
  string friendId = 1; //好友ID
  string userId = 2;   //用户ID
}

//同意
message FriendAgreeReq {
  repeated string friendIds = 1; //被同意的用户
}
message FriendAgreeResp {
  int32 Num = 1; //操作的数量
}

//拒绝
message FriendRefuseReq {
  repeated string friendIds = 1; //被拒绝的用户
}
message FriendRefuseResp {
  int32 Num = 1; //操作的数量
}

//好友申请列表
message FriendApplyListReq {}
message FriendApplyListResp { repeated FriendBase list = 1; }

//好友搜索
message FriendSearchReq {
  string nickName = 1; //好友昵称
}

message FriendSearchResp { FriendBase friend = 1; }

//黑名单
message FriendBlackListReq {}

message FriendBlackListResp { repeated FriendBase friends = 1; }

//添加黑名单
message FriendBlackAddReq { string friendId = 1; }

message FriendBlackAddResp {
  string friendId = 1;
  string userId = 2;
}

//删除黑名单
message FriendDelBlackReq { string friendId = 1; }

message FriendDelBlackResp {
  string friendId = 1;
  string userId = 2;
}

//接收
message FriendReceiveReq { string friendId = 1; }

message FriendReceiveResp {
  string friendId = 1;
  string userId = 2;
}

//赠送
message FriendGiveReq { string friendId = 1; }

message FriendGiveResp {
  string friendId = 1;
  string userId = 2;
}

//好友数量
message FriendTotalReq { string friendId = 1; }

message FriendTotalResp {
  string friendId = 1;
  int32 total = 2; //好友数量
}