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

import "friend_db.proto";

message FriendBase {
  string userId = 1;     // ID
  string NickName = 2;   //昵称
  int32 level = 3;       //等级
  string avatar = 4;     //头像
  int64 strength = 5;    //战力
  string serverId = 6;   //服务编号
  int64 offlineTime = 7; //最近一次下线时间 -1在线
  bool isApplied = 8;    //是否已申请加好友
  bool isZaned = 9;      //是否已点赞
  bool isGetZaned = 10;  //是否已获赞
  string heroObjId = 11; //助战英雄ID
  int32 score = 12;      //助战分数
  int64 updateTime = 13; //更新时间
}

//好友列表
message FriendListReq {}

message FriendListResp { repeated FriendBase list = 1; }

// 随机的在线玩家
message FriendRandlistReq {}
message FriendRandlistResp { 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 { repeated FriendBase friends = 1; }

//黑名单
message FriendBlackListReq {}

message FriendBlackListResp { repeated FriendBase friends = 1; }

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

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

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

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

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

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

// 点赞列表
message FriendZanlistReq {}
message FriendZanlistResp { repeated FriendBase list = 1; }

// 点赞
message FriendZanReq { repeated string friendIds = 1; }

message FriendZanResp { bool flag = 1; }

//接收点赞
message FriendZanreceiveReq { repeated string friendIds = 1; }

message FriendZanreceiveResp { bool flag = 1; }

// 设置助战英雄
message FriendAssistheroReq { string heroObjId = 1; }
message FriendAssistheroResp {
  string heroObjId = 1;
  int32 received = 2; //领取奖励状态0未领1可领2已领
}

//助战列表
message FriendAssistlistReq {}
message FriendAssistlistResp {
  repeated FriendBase list = 1;     //好友助战排行
  string heroObjId = 2;             //助战英雄
  repeated AssistRecord record = 3; //我的助战记录
}

// 助战奖励
message FriendGetrewardReq {}
message FriendGetrewardResp { int32 received = 1; }

// 助战英雄更新推送
message FriendAssistHeroUpdatePush {
  FriendBase friend = 1; //好友
}

//好友助战英雄列表
message FriendAssistHeroListReq {}
message FriendAssistHeroListResp { repeated FriendBase friends = 1; }

// 查询是否已申请目标玩家为好友或目标玩家是否已是好友
message FriendGetRelationReq{
  string targetUid = 1; //目标玩家ID
}

message FriendGetRelationResp{
  string targetUid = 1;
  bool status = 2;  //已是好友或已申请返回true
}

// 切磋请求
message FriendQiecuoReq{
  string targetUid = 1; //切磋目标玩家UID
}

message FriendQiecuoResp{
  string targetUid  =1; //切磋目标
  string uid = 2;  //发起者
}

//接受切磋
message FriendAcceptReq{
  string uid = 1; //切磋发起者
}

message FriendAcceptResp{
  bool isSucc = 1;
}

//拒绝切磋
message FriendStopReq{
 string uid = 1; //切磋发起者 
}

message FriendStopResp{
  bool isSucc = 1;
  
}

message FriendQiecuonotifyPush{
  string uid = 1; //发起者（切磋)
  int32 notifyType = 2; //1发起通知 2接受通知 3拒绝通知
}