syntax = "proto3"; package pb; option go_package = "./pb"; // model message User { int64 id = 1; string username = 2; // platform string platform = 3; string pUid = 4; string pUname = 5; string pAvatar = 6; string pInfo = 7; } message Empty {} // req message PlatformUserReq { string platform = 1; string pUid = 2; } message PlatformUserResp { User user = 1; } // 通知-PvP杀兵营(人) statistics.pvp.kill message StatPvPKillReq { int64 uid = 1; // 用户ID int64 targetUid = 2; // 目标用户 bool isGeneral = 3; // targetUid是否名将 } // 通知-PvP一血 statistics.pvp.first message StatPvPFirstBloodReq { int64 uid = 1; // 用户ID int32 type = 2; // 1-拿到一血 2-被破一血 } // 通知-PvP战报 statistics.pvp.report message StatPvPReportReq { message Item { int64 uid = 1; // 用户ID int64 damage = 2; // 伤害量 int64 deDamage = 3; // 承受伤害 int64 killUnit = 4; // 击杀单位数量 int64 deKillUnit = 5; // 被杀单位数量 } int32 winCamp = 1; // 获胜阵营 1-蓝 2-红 int64 generalUid = 2; // 名将UID repeated Item winItems = 3; // 获胜方数据 repeated Item lostItems = 4; // 战败方数据 } // rank message RankPvpReq { int32 type = 1; // rank类型 int32 topN = 2; // TopN } message RankPvpResp { message Item { int64 uid = 1; string uname = 2; int64 score = 3; string avatar = 4; } int32 type = 1; // rank类型 repeated Item items = 2; // rank数据 } service userCenter { // user rpc retrievePlatformUser(PlatformUserReq) returns (PlatformUserResp); // statistics rpc statPvpKill(StatPvPKillReq) returns (Empty); rpc statPvpFirstBlood(StatPvPFirstBloodReq) returns (Empty); rpc statPvpReport(StatPvPReportReq) returns (Empty); // rank rpc rankPvp(RankPvpReq) returns(RankPvpResp); }