syntax = "proto3"; package tutorial; option java_package = "com.duowan.allstar.proto"; option java_outer_classname = "MessageProtos"; message Message { enum Type { SELF = 0; DATA = 1; NOTIFY = 2; ROLEOPT = 3; REPORT = 4; BD_ITEM = 5; } Type type = 1; message DataMessage { int32 code = 1; int32 result = 2; string data = 3; string msg = 4; } DataMessage dataMessage = 2; // Enum nType {1: 普通通知;2: 好友列表通知; 3: 艺人列表通知,4:用户家园建筑列表通知,5:任务大厅通知} message NotificationMessage { int32 nType = 1; } NotificationMessage notificationMessage = 3; // 即对 targetUid 做了什么操作 opt // e.g.: 向 targetUid 赎身; 向 targetUid 签约 // Enum opt {1: 赎身; 2: 抢夺; 3: 签约; 4: 解雇; 5: 入驻;6: 召回;7: 驱赶;8: 举报;9:通过好友申请;10:成为好友} message RoleOptMessage { // 目标用户 int64 targetUid = 1; // 赎身或者抢夺成功时,前任老板的uid int64 exBossUid = 2; // 操作类型 int32 opt = 3; } RoleOptMessage roleOptMessage = 4; // 数据上报 message ReportData { /** * 上报序号,每次重新获取时重置 */ int32 seq = 1; /** * 时间戳 */ int64 t = 2; /** * @see com.duowan.allstar.model.enumeration.Cmd */ int32 cmd = 3; /** * grossIncome */ int64 gi = 4; /** * @see com.duowan.allstar.model.home.UserExtra#stars */ int64 s = 5; /** * @see BuildingInfoForm */ repeated BuildingInfo b = 6; /** * 未解锁建筑 */ repeated BuildingInfo ub = 7; } ReportData reportData = 5; message BuildingInfo { // buildingId int64 id = 1; // 等级 int32 l = 2; // coin count 金币存储次数 int32 cc = 3; } string msg = 6; message BuildingItems { map buildingItem = 1; } BuildingItems buildingItems = 7; message Item { int64 id = 1; int32 count = 2; } }