移除proto,采用svn 的proto 源处理
This commit is contained in:
parent
88ae9d1694
commit
a09167d66a
@ -1,25 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
|
||||
enum ChatChannel {
|
||||
World = 0; //世界频道
|
||||
Union = 1; //工会频道
|
||||
Private = 2; //私有频道
|
||||
CrossServer = 3; //跨服频道
|
||||
System = 4; //系统频道
|
||||
}
|
||||
|
||||
|
||||
message DBChat {
|
||||
string id =1; //主键id
|
||||
ChatChannel channel = 2; //频道
|
||||
string suid =3; //发送用户id
|
||||
string ruid = 4; //接收用户id channel == Private 有效
|
||||
int32 groud = 5; //跨服频道 分组id
|
||||
int32 areaId = 6; //跨服频道 频道Id
|
||||
string unionId = 7; //工会id
|
||||
int32 headid = 8; //用户头像
|
||||
string uname = 9; //用户名
|
||||
string content = 10; //内容
|
||||
int64 ctime = 11; //创建时间
|
||||
}
|
@ -1,70 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
import "chat/chat_db.proto";
|
||||
|
||||
//聊天消息推送
|
||||
message ChatMessagePush{
|
||||
DBChat chat = 1;
|
||||
}
|
||||
|
||||
//申请跨服频道号
|
||||
message ChatCrossChannelReq {
|
||||
|
||||
}
|
||||
//申请跨服频道号 回应
|
||||
message ChatCrossChannelResp {
|
||||
int32 channelId = 1;
|
||||
}
|
||||
|
||||
//申请切换频道
|
||||
message ChatChanageChannelReq {
|
||||
int32 channelId = 1;
|
||||
}
|
||||
//申请切换频道 回应
|
||||
message ChatChanageChannelResp {
|
||||
int32 channelId = 1;
|
||||
bool isSucc = 2;
|
||||
}
|
||||
|
||||
//请求聊天消息
|
||||
message ChatGetListReq {
|
||||
ChatChannel channel = 1; //频道
|
||||
}
|
||||
//请求聊天消息 回应
|
||||
message ChatGetListResp {
|
||||
repeated DBChat chats = 1;
|
||||
}
|
||||
|
||||
|
||||
//请求跨服聊天消息
|
||||
message ChatSpanGetListReq {
|
||||
ChatChannel channel = 1; //频道
|
||||
int32 channelId = 2; //跨服频道id
|
||||
}
|
||||
//请求跨服聊天消息 回应
|
||||
message ChatSpanGetListResp {
|
||||
repeated DBChat chats = 1;
|
||||
}
|
||||
|
||||
//消息发送请求
|
||||
message ChatSendReq {
|
||||
ChatChannel channel = 1; //频道
|
||||
string targetId = 2; //目标用户id
|
||||
string content = 3; //内容
|
||||
}
|
||||
//消息发送请求 回应
|
||||
message ChatSendResp {
|
||||
|
||||
}
|
||||
|
||||
|
||||
//跨服消息发送请求
|
||||
message ChatSpanSendReq {
|
||||
ChatChannel channel = 1; //频道
|
||||
string content = 2; //内容
|
||||
}
|
||||
//跨服消息发送请求 回应
|
||||
message ChatSpanSendResp {
|
||||
|
||||
}
|
||||
|
@ -1,96 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
import "errorcode.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
|
||||
//用户消息流结构
|
||||
message UserMessage {
|
||||
string MainType = 1; //用户消息处理 模块名 例如:user 对应项目中 user的模块
|
||||
string SubType = 2; //用户消息处理函数名 例如:login 对应项目中 user的模块中
|
||||
// api_login 的处理函数
|
||||
google.protobuf.Any data = 3;
|
||||
string sec = 4; //密文
|
||||
}
|
||||
|
||||
//代理用户转发消息结构
|
||||
message AgentMessage {
|
||||
string Ip = 1;
|
||||
string UserSessionId = 2;
|
||||
string UserId = 3;
|
||||
string ServiceTag = 4;
|
||||
string GatewayServiceId = 5;
|
||||
string MainType = 6;
|
||||
string SubType = 7;
|
||||
google.protobuf.Any Message = 8;
|
||||
}
|
||||
|
||||
// RPC 服务固定回复结构
|
||||
message RPCMessageReply {
|
||||
ErrorCode Code = 1;
|
||||
string ErrorMessage = 2;
|
||||
google.protobuf.Any ErrorData = 3;
|
||||
repeated UserMessage Reply = 4;
|
||||
}
|
||||
|
||||
//用户代理绑定Uid请求
|
||||
message AgentBuildReq {
|
||||
string UserSessionId = 1;
|
||||
string UserId = 2;
|
||||
string WorkerId = 3;
|
||||
}
|
||||
//用户代理解绑请求
|
||||
message AgentUnBuildReq { string UserSessionId = 1; }
|
||||
|
||||
//向用户代理发送消息请求
|
||||
message AgentSendMessageReq {
|
||||
string UserSessionId = 1;
|
||||
repeated UserMessage Reply = 2;
|
||||
}
|
||||
|
||||
//发送批量消息
|
||||
message BatchMessageReq {
|
||||
repeated string UserSessionIds = 1;
|
||||
string MainType = 2;
|
||||
string SubType = 3;
|
||||
google.protobuf.Any Data = 4;
|
||||
}
|
||||
|
||||
//发送广播消息
|
||||
message BroadCastMessageReq {
|
||||
string MainType = 1; //服务名
|
||||
string SubType = 2;
|
||||
google.protobuf.Any Data = 3;
|
||||
}
|
||||
|
||||
//关闭用户代理
|
||||
message AgentCloseeReq { string UserSessionId = 1; }
|
||||
|
||||
//通知用户离线
|
||||
message NoticeUserCloseReq {
|
||||
string Ip = 1;
|
||||
string UserSessionId = 2;
|
||||
string UserId = 3;
|
||||
string ServiceTag = 4;
|
||||
string GatewayServiceId = 5;
|
||||
}
|
||||
|
||||
//英雄属性类型
|
||||
enum HeroAttributesType {
|
||||
Hp = 0; //血量
|
||||
Atk = 1; //攻击
|
||||
Def = 2; //防御
|
||||
Speed = 3; //速度
|
||||
Crit = 4; //暴击
|
||||
}
|
||||
|
||||
//用户资产数据 对标*cfg.Game_atn 数据结构
|
||||
message UserAssets {
|
||||
string A = 1;
|
||||
string T = 2;
|
||||
int32 N = 3;
|
||||
}
|
||||
|
||||
message TaskParam {
|
||||
int32 first = 1; //限定条件
|
||||
int32 second = 2; //次数
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
|
||||
//装备属性词条
|
||||
message EquipmentAttributeEntry {
|
||||
int32 Id = 1; //属性词条主键id 唯一
|
||||
int32 libraryid = 2; //属性词条id 非唯一
|
||||
string AttrName = 3; //属性名
|
||||
int32 Lv = 4; //属性等级
|
||||
int32 Value = 5; //属性值
|
||||
}
|
||||
|
||||
//武器数据
|
||||
message DB_Equipment {
|
||||
string Id = 1; //@go_tags(`bson:"_id"`) 装备id
|
||||
string cId = 2; //@go_tags(`bson:"cId"`) 配置Id
|
||||
string uId = 3; //@go_tags(`bson:"uid"`) 所属玩家Id
|
||||
string heroId = 5; //@go_tags(`bson:"heroId"`) 挂在的英雄卡片id 未装备 填 ''
|
||||
sint32 lv = 6; //@go_tags(`bson:"lv"`) 装备强化等级
|
||||
sint32 keepFailNum = 7; //@go_tags(`bson:"keepFailNum"`) 连续强化失败次数
|
||||
EquipmentAttributeEntry mainEntry = 8; //@go_tags(`bson:"mainEntry"`) 装备主词条
|
||||
repeated EquipmentAttributeEntry adverbEntry = 9; //@go_tags(`bson:"adverbEntry"`) 装备副词条
|
||||
uint32 overlayNum = 10; //@go_tags(`bson:"overlayNum"`) 叠加数量
|
||||
bool isInitialState = 11; //@go_tags(`bson:"isInitialState"`) 是否初始状态
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
import "equipment/equipment_db.proto";
|
||||
|
||||
//获取装备列表请求
|
||||
message EquipmentGetListReq {
|
||||
|
||||
}
|
||||
//获取装备列表请求 回应
|
||||
message EquipmentGetListResp {
|
||||
repeated DB_Equipment Equipments = 1; //装备列表
|
||||
}
|
||||
|
||||
//推送装备背包变化
|
||||
message EquipmentChangePush {
|
||||
repeated DB_Equipment Equipments = 1; //装备列表
|
||||
}
|
||||
|
||||
//装备挂在到英雄上
|
||||
message EquipmentEquipReq{
|
||||
string HeroCardId = 1; //英雄卡Id
|
||||
repeated string EquipmentId = 2; //装备Id 固定长度的数组 0-5 对应的装备栏
|
||||
}
|
||||
|
||||
//装备挂在到英雄上 回应
|
||||
message EquipmentEquipResp{
|
||||
repeated DB_Equipment Equipments = 1; //挂在装备列表
|
||||
}
|
||||
|
||||
//装备升级
|
||||
message EquipmentUpgradeReq{
|
||||
string EquipmentId = 1; //装备Id
|
||||
}
|
||||
|
||||
//装备升级 回应
|
||||
message EquipmentUpgradeResp{
|
||||
bool IsSucc = 1;
|
||||
repeated DB_Equipment Equipment = 2; //由于装备可以叠加 升级后会创建一个新的装备出来 所以可能影响两个装备
|
||||
}
|
@ -1,109 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
|
||||
enum ErrorCode {
|
||||
Success = 0; //成功
|
||||
NoFindService = 10; //没有找到远程服务器
|
||||
NoFindServiceHandleFunc = 11; //远程服务器未找到执行方法
|
||||
RpcFuncExecutionError = 12; // Rpc方法执行错误
|
||||
CacheReadError = 13; //缓存读取失败
|
||||
SqlExecutionError = 14; //数据库执行错误
|
||||
ReqParameterError = 15; //请求参数错误
|
||||
SignError = 16; //签名错误
|
||||
InsufficientPermissions = 17; //权限不足
|
||||
NoLogin = 18; //未登录
|
||||
UserSessionNobeing = 19; //用户不存在
|
||||
StateInvalid = 20; //无效状态
|
||||
DBError = 21; //数据库操作失败
|
||||
SystemError = 22; //通用错误
|
||||
Exception = 100; //程序执行异常
|
||||
Unknown = 101; //未知错误
|
||||
ResNoEnough = 102; //资源不足
|
||||
ConfigurationException = 103; //配置异常
|
||||
ConfigNoFound = 104; //配置未找到
|
||||
|
||||
// user
|
||||
SecKeyInvalid = 1000; //秘钥无效
|
||||
SecKey = 1001; //秘钥格式错误
|
||||
BindUser = 1002; //用户绑定错误
|
||||
GoldNoEnough = 1003; // 金币不足
|
||||
DiamondNoEnough = 1004; // 钻石不足
|
||||
RoleCreated = 1005; //已创角
|
||||
NameExist = 1006; //昵称已存在
|
||||
VeriCodeNoValid = 1007; //验证码无效
|
||||
VeriCodeExpired = 1008; //验证码过期
|
||||
UserResetData = 1009; //初始化用户失败
|
||||
ModifynameCount = 1010; //名称修改次数不足
|
||||
MailErr = 1011; // 邮件不存在
|
||||
|
||||
// friend
|
||||
FriendNotSelf = 1100; //不能是自己
|
||||
FriendSelfMax = 1101; //超出好友最大数量
|
||||
FriendTargetMax = 1102; //超出目标好友最大数量
|
||||
FriendSelfNoData = 1103; //无好友记录
|
||||
FriendTargetNoData = 1104; //无目标好友记录
|
||||
FriendYet = 1105; //已是好友
|
||||
FriendApplyYet = 1106; //已申请该好友
|
||||
FriendSelfBlackYet = 1107; //已在自己黑名单中
|
||||
FriendTargetBlackYet = 1108; //已在对方的黑名单中
|
||||
FriendApplyError = 1109; //申请失败
|
||||
FriendBlackMax = 1110; //黑名单最大数量
|
||||
FriendSearchNameEmpty = 1111; //查询昵称为空
|
||||
|
||||
// item
|
||||
ItemsNoEnough = 1200; //背包物品不足
|
||||
ItemsNoFoundGird = 1201; //背包未找到物品格子
|
||||
ItemsGridNumUpper = 1202; //背包格子数量已达上限
|
||||
ItemsGirdAmountUpper = 1203; //背包格子容量已达上限
|
||||
ItemsUseNotSupported = 1204; //暂不支持使用
|
||||
|
||||
// hero
|
||||
HeroNoExist = 1300; //英雄不存在
|
||||
HeroNoEnough = 1301; //英雄数量不足
|
||||
HeroMaxLv = 1302; //英雄达到最大等级
|
||||
HeroInitCreat = 1303; //初始化英雄
|
||||
HeroColorErr = 1304; // 品质不匹配
|
||||
HeroSkillUpErr = 1305; // 技能升级失败
|
||||
HeroMaxResonate = 1306; // 达到最大共鸣次数
|
||||
HeroNoResonate = 1307; // 没有共鸣
|
||||
HeroNotNeedResonate = 1308; // 不需要重置共鸣
|
||||
HeroNoEnergy = 1309; // 没有能量点数
|
||||
HeroCreate = 1310; // 创建卡失败
|
||||
HeroEquipUpdate = 1311; // 更新装备失败
|
||||
HeroMaxAwaken = 1312; // 达到最大觉醒等级
|
||||
HeroIsLock = 1313; // 英雄被锁定不能被消耗
|
||||
HeroMaxCount = 1314; // 英雄达到最大数量
|
||||
HeroCostTypeErr = 1315; // 消耗英雄参数不匹配
|
||||
HeroStarErr = 1316; // 不满足升星条件
|
||||
HeroTypeErr = 1317; // 升级英雄类型不对
|
||||
HeroExpTypeErr = 1318; // 技能升级卡类型不对
|
||||
HeroAddMaxExp = 1319; // 升级经验卡溢出 检查传入的数量
|
||||
HeroStarLvErr = 1320; // 升星等级不够
|
||||
HeroMaxStarLv = 1321; // 达到最大升星等级
|
||||
DrawCardTypeNotFound = 1322; // 抽卡类型不匹配
|
||||
|
||||
// equipment
|
||||
EquipmentOnFoundEquipment = 1400; // 未找到武器
|
||||
EquipmentLvlimitReached = 1401; // 武器等级已达上限
|
||||
// mainMainline
|
||||
MainlineNotFindChapter = 1500; // 没有找到主线关卡信息
|
||||
MainlineIDFailed = 1501; // 关卡ID 错误
|
||||
MainlineNotFound = 1502; // 主线关卡不存在
|
||||
MainlinePreNotFound = 1503; // 前置关卡不匹配
|
||||
MainlineRepeatReward = 1504; // 重复领奖
|
||||
MainlineCompleteReward = 1505; // 通关才能领奖
|
||||
|
||||
// task
|
||||
TaskInit = 1600; //初始化失败
|
||||
TaskReset = 1601; //重置任务失败
|
||||
TaskHandle = 1602; //任务处理失败
|
||||
TaskReceived = 1603; //已领取
|
||||
TaskActiveInit = 1604; //初始化活跃度失败
|
||||
TaskActiveNofound = 1605; //未找到用户活跃度配置
|
||||
TaskActiveNoenough = 1606; //活跃值未达标
|
||||
TaskNoFinished = 1607; //任务未完成
|
||||
TaskFinished = 1608; //已完成
|
||||
|
||||
// shop
|
||||
ShopGoodsIsSoldOut = 1700; //商品已售罄
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
|
@ -1,2 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
@ -1,9 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
|
||||
message DBFriend {
|
||||
string uid = 1; //@go_tags(`bson:"uid"`) 用户ID
|
||||
repeated string friendIds = 2; //@go_tags(`bson:"friendIds"`) 好友ID
|
||||
repeated string applyIds = 3; //@go_tags(`bson:"applyIds"`) 申请用户ID
|
||||
repeated string blackIds = 4; //@go_tags(`bson:"blackIds"`) 黑名单ID
|
||||
}
|
@ -1,108 +0,0 @@
|
||||
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; //好友数量
|
||||
}
|
@ -1,158 +0,0 @@
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
// https://developers.google.com/protocol-buffers/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.protobuf;
|
||||
|
||||
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
||||
option go_package = "google.golang.org/protobuf/types/known/anypb";
|
||||
option java_package = "com.google.protobuf";
|
||||
option java_outer_classname = "AnyProto";
|
||||
option java_multiple_files = true;
|
||||
option objc_class_prefix = "GPB";
|
||||
|
||||
// `Any` contains an arbitrary serialized protocol buffer message along with a
|
||||
// URL that describes the type of the serialized message.
|
||||
//
|
||||
// Protobuf library provides support to pack/unpack Any values in the form
|
||||
// of utility functions or additional generated methods of the Any type.
|
||||
//
|
||||
// Example 1: Pack and unpack a message in C++.
|
||||
//
|
||||
// Foo foo = ...;
|
||||
// Any any;
|
||||
// any.PackFrom(foo);
|
||||
// ...
|
||||
// if (any.UnpackTo(&foo)) {
|
||||
// ...
|
||||
// }
|
||||
//
|
||||
// Example 2: Pack and unpack a message in Java.
|
||||
//
|
||||
// Foo foo = ...;
|
||||
// Any any = Any.pack(foo);
|
||||
// ...
|
||||
// if (any.is(Foo.class)) {
|
||||
// foo = any.unpack(Foo.class);
|
||||
// }
|
||||
//
|
||||
// Example 3: Pack and unpack a message in Python.
|
||||
//
|
||||
// foo = Foo(...)
|
||||
// any = Any()
|
||||
// any.Pack(foo)
|
||||
// ...
|
||||
// if any.Is(Foo.DESCRIPTOR):
|
||||
// any.Unpack(foo)
|
||||
// ...
|
||||
//
|
||||
// Example 4: Pack and unpack a message in Go
|
||||
//
|
||||
// foo := &pb.Foo{...}
|
||||
// any, err := anypb.New(foo)
|
||||
// if err != nil {
|
||||
// ...
|
||||
// }
|
||||
// ...
|
||||
// foo := &pb.Foo{}
|
||||
// if err := any.UnmarshalTo(foo); err != nil {
|
||||
// ...
|
||||
// }
|
||||
//
|
||||
// The pack methods provided by protobuf library will by default use
|
||||
// 'type.googleapis.com/full.type.name' as the type URL and the unpack
|
||||
// methods only use the fully qualified type name after the last '/'
|
||||
// in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
||||
// name "y.z".
|
||||
//
|
||||
//
|
||||
// JSON
|
||||
//
|
||||
// The JSON representation of an `Any` value uses the regular
|
||||
// representation of the deserialized, embedded message, with an
|
||||
// additional field `@type` which contains the type URL. Example:
|
||||
//
|
||||
// package google.profile;
|
||||
// message Person {
|
||||
// string first_name = 1;
|
||||
// string last_name = 2;
|
||||
// }
|
||||
//
|
||||
// {
|
||||
// "@type": "type.googleapis.com/google.profile.Person",
|
||||
// "firstName": <string>,
|
||||
// "lastName": <string>
|
||||
// }
|
||||
//
|
||||
// If the embedded message type is well-known and has a custom JSON
|
||||
// representation, that representation will be embedded adding a field
|
||||
// `value` which holds the custom JSON in addition to the `@type`
|
||||
// field. Example (for message [google.protobuf.Duration][]):
|
||||
//
|
||||
// {
|
||||
// "@type": "type.googleapis.com/google.protobuf.Duration",
|
||||
// "value": "1.212s"
|
||||
// }
|
||||
//
|
||||
message Any {
|
||||
// A URL/resource name that uniquely identifies the type of the serialized
|
||||
// protocol buffer message. This string must contain at least
|
||||
// one "/" character. The last segment of the URL's path must represent
|
||||
// the fully qualified name of the type (as in
|
||||
// `path/google.protobuf.Duration`). The name should be in a canonical form
|
||||
// (e.g., leading "." is not accepted).
|
||||
//
|
||||
// In practice, teams usually precompile into the binary all types that they
|
||||
// expect it to use in the context of Any. However, for URLs which use the
|
||||
// scheme `http`, `https`, or no scheme, one can optionally set up a type
|
||||
// server that maps type URLs to message definitions as follows:
|
||||
//
|
||||
// * If no scheme is provided, `https` is assumed.
|
||||
// * An HTTP GET on the URL must yield a [google.protobuf.Type][]
|
||||
// value in binary format, or produce an error.
|
||||
// * Applications are allowed to cache lookup results based on the
|
||||
// URL, or have them precompiled into a binary to avoid any
|
||||
// lookup. Therefore, binary compatibility needs to be preserved
|
||||
// on changes to types. (Use versioned type names to manage
|
||||
// breaking changes.)
|
||||
//
|
||||
// Note: this functionality is not currently available in the official
|
||||
// protobuf release, and it is not used for type URLs beginning with
|
||||
// type.googleapis.com.
|
||||
//
|
||||
// Schemes other than `http`, `https` (or the empty scheme) might be
|
||||
// used with implementation specific semantics.
|
||||
//
|
||||
string type_url = 1;
|
||||
|
||||
// Must be a valid serialized protocol buffer of the above specified type.
|
||||
bytes value = 2;
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
|
||||
message SkillData {
|
||||
int32 skillID = 1;
|
||||
int32 skillLv = 2;
|
||||
}
|
||||
|
||||
message DBHero {
|
||||
string id = 1; //@go_tags(`bson:"_id"`) ID
|
||||
string uid = 2;
|
||||
string heroID = 3; //@go_tags(`bson:"heroID"`) 英雄的配置表ID
|
||||
int32 star = 4; // 英雄星级
|
||||
int32 lv = 5; // 英雄等级
|
||||
int32 exp = 6; // 英雄经验
|
||||
int32 juexingLv = 7; //@go_tags(`bson:"juexingLv"`) 觉醒等级
|
||||
int32 captainSkill = 8; //@go_tags(`bson:"captainSkill"`) 队长技能
|
||||
repeated SkillData normalSkill = 9; //@go_tags(`bson:"normalSkill"`) 普通技能
|
||||
map<string, int32> property = 10; // 属性相关
|
||||
map<string, int32> addProperty = 11; //@go_tags(`bson:"addProperty"`) 附加属性相关
|
||||
int32 cardType = 12; //@go_tags(`bson:"cardType"`) 卡片类型(升星卡、经验卡、技能升级卡)
|
||||
int32 curSkin = 13; //@go_tags(`bson:"curSkin"`) 当前装备的皮肤ID
|
||||
repeated int32 skins = 14; // 所有皮肤ID
|
||||
bool block = 15; // 锁定
|
||||
repeated string equipID = 16; //@go_tags(`bson:"equipID"`) 装备 objID
|
||||
int32 resonateNum = 17; //@go_tags(`bson:"resonateNum"`) 共鸣次数
|
||||
int32 distributionResonate = 18; //@go_tags(`bson:"distributionResonate"`) 分配的共鸣能量
|
||||
map<int32, int32> energy = 19; // @go_tags(`bson:"energy"`)能量分配到哪里[1,0]
|
||||
int32 sameCount = 20; // @go_tags(`bson:"sameCount"`) 卡片叠加数量
|
||||
int32 suiteId = 21; //@go_tags(`bson:"suiteId"`) 套装Id
|
||||
int32 suiteExtId = 22; // go_tags(`bson:"suiteExtId"`) 扩展套装Id
|
||||
bool isOverlying = 23; // go_tags(`bson:"isOverlying"`) 是否允许叠加 默认true
|
||||
}
|
@ -1,155 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
import "hero/hero_db.proto";
|
||||
|
||||
//英雄基础信息
|
||||
message HeroInfoReq {
|
||||
string heroId = 1; //英雄唯一ID
|
||||
}
|
||||
message HeroInfoResp { DBHero base = 1; }
|
||||
|
||||
//英雄列表
|
||||
message HeroListReq {}
|
||||
|
||||
message HeroListResp { repeated DBHero list = 1; }
|
||||
|
||||
/// 卡牌养成: 强化(卡牌升级、卡牌升星、技能升级)
|
||||
/// 卡牌养成: 共鸣(共鸣消耗、材料返回、能量点使用)
|
||||
/// 卡牌养成: 觉醒(英雄觉醒、材料消耗)
|
||||
|
||||
message ItemData {
|
||||
int32 itemId = 2; //物品Id
|
||||
int32 amount = 3; //数量
|
||||
}
|
||||
|
||||
message MapStringInt32 {
|
||||
string Key = 1;
|
||||
int32 Value = 2;
|
||||
}
|
||||
|
||||
// 卡牌升级
|
||||
message HeroStrengthenUplvReq {
|
||||
string heroObjID = 1; // 英雄对象ID
|
||||
repeated MapStringInt32 expCards = 2;
|
||||
}
|
||||
|
||||
// 卡牌升级返回
|
||||
message HeroStrengthenUplvResp {
|
||||
DBHero hero = 1; // 英雄对象
|
||||
}
|
||||
|
||||
message CostCardData {
|
||||
string costCardObj = 1; // 对象ID
|
||||
int32 amount = 2; // 数量
|
||||
}
|
||||
// 卡牌升星
|
||||
message HeroStrengthenUpStarReq {
|
||||
string heroObjID = 1; // 英雄对象ID
|
||||
repeated CostCardData hero = 2; // 消耗卡牌对象ID
|
||||
repeated CostCardData heroRace = 3; // 消耗种族卡牌对象ID
|
||||
}
|
||||
|
||||
// 卡牌升星返回
|
||||
message HeroStrengthenUpStarResp {
|
||||
DBHero hero = 1; // 英雄对象
|
||||
}
|
||||
|
||||
// 卡牌技能升级
|
||||
message HeroStrengthenUpSkillReq {
|
||||
string heroObjID = 1; // 英雄对象ID
|
||||
string costCardObj = 2; // 消耗技能升级卡
|
||||
}
|
||||
|
||||
// 卡牌技能升级返回
|
||||
message HeroStrengthenUpSkillResp {
|
||||
DBHero hero = 1; // 英雄对象
|
||||
}
|
||||
|
||||
// 共鸣英雄
|
||||
message HeroResonanceReq {
|
||||
string heroObjID = 1; // 英雄对象ID
|
||||
repeated string costObjID = 2; // 消耗对象
|
||||
}
|
||||
|
||||
message HeroResonanceResp {
|
||||
DBHero hero = 1; // 英雄对象
|
||||
int32 energy = 2; // 共鸣成功 获得的能量点数
|
||||
DBHero upStarCard = 3; //共鸣成功 获得的升星卡
|
||||
}
|
||||
|
||||
// 重置共鸣属性
|
||||
message HeroResonanceResetReq {
|
||||
string heroObjID = 1; // 英雄对象ID
|
||||
}
|
||||
|
||||
message HeroResonanceResetResp {
|
||||
DBHero hero = 1; // 英雄对象
|
||||
int32 energy = 2; // 能量点数
|
||||
}
|
||||
|
||||
// 使用能量点数
|
||||
message HeroResonanceUseEnergyReq {
|
||||
string heroObjID = 1; // 英雄对象ID
|
||||
int32 useEnergy = 2; // 使用的能量点数
|
||||
int32 useType = 3; // 使用的类型 (攻击、血量、防御)
|
||||
}
|
||||
|
||||
message HeroResonanceUseEnergyResp {
|
||||
DBHero hero = 1; // 英雄对象
|
||||
}
|
||||
|
||||
// 觉醒
|
||||
message HeroAwakenReq {
|
||||
string heroObjID = 1; // 英雄对象ID
|
||||
}
|
||||
|
||||
// 觉醒返回
|
||||
message HeroAwakenResp {
|
||||
DBHero hero = 1; // 英雄对象
|
||||
}
|
||||
|
||||
//抽卡
|
||||
message HeroChoukaReq { repeated string heroIds = 1; }
|
||||
|
||||
message HeroChoukaResp { repeated DBHero heroes = 1; }
|
||||
|
||||
//英雄属性推送
|
||||
message HeroPropertyPush {
|
||||
string heroId = 1; //英雄唯一ID
|
||||
map<string, int32> property = 2; //基础属性
|
||||
map<string, int32> addProperty = 3; //附加属性
|
||||
}
|
||||
|
||||
// 英雄锁定
|
||||
message HeroLockReq { string heroid = 1; }
|
||||
|
||||
// 英雄锁定返回
|
||||
message HeroLockResp {
|
||||
DBHero hero = 1; // 英雄对象
|
||||
}
|
||||
|
||||
// 测试用(获取指定星级等级的英雄)
|
||||
message HeroGetSpecifiedReq {
|
||||
string heroCoinfigID = 1; // 英雄配置ID
|
||||
int32 Amount = 2; // 数量
|
||||
int32 star = 3; // 星级
|
||||
int32 lv = 4; // 等级
|
||||
}
|
||||
|
||||
message HeroGetSpecifiedResp {
|
||||
DBHero hero = 1; // 英雄对象
|
||||
}
|
||||
|
||||
// 抽卡
|
||||
message HeroDrawCardReq {
|
||||
int32 drawType = 1; // 抽卡类型 见drawCardCost表
|
||||
}
|
||||
|
||||
message HeroDrawCardResp {
|
||||
repeated string heroes = 1; // 返回英雄的configID
|
||||
}
|
||||
|
||||
// 英雄变化推送
|
||||
message HeroChangePush{
|
||||
repeated DBHero list = 1;
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
|
||||
|
||||
//背包格子
|
||||
message DB_UserItemData {
|
||||
string gridId = 1; //@go_tags(`bson:"_id"`) 背包格子Id
|
||||
string uId = 2; //@go_tags(`bson:"uid"`) 用户id
|
||||
string itemId = 3; //@go_tags(`bson:"itemId"`) 存放物品的Id
|
||||
uint32 amount = 4; //@go_tags(`bson:"amount"`) 存放物品的数量
|
||||
int64 cTime = 5; //@go_tags(`bson:"cTime"`) 物品获取时间
|
||||
int64 eTime = 6; //@go_tags(`bson:"eTime"`) 物品过期时间
|
||||
bool isNewItem = 7; //@go_tags(`bson:"isNewItem"`) 是否是新的
|
||||
int64 lastopt = 8; //@go_tags(`bson:"lastopt"`) 最后操作时间
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
import "items/items_db.proto";
|
||||
|
||||
//查询用户背包请求
|
||||
message ItemsGetlistReq {
|
||||
int32 IType = 1; //道具类型
|
||||
}
|
||||
|
||||
//查询用户背包请求 回应
|
||||
message ItemsGetlistResp {
|
||||
repeated DB_UserItemData Grids = 1; //用户背包列表
|
||||
}
|
||||
|
||||
//背包变化推送
|
||||
message ItemsChangePush {
|
||||
repeated DB_UserItemData Grids = 1; //变化数据
|
||||
}
|
||||
|
||||
//使用物品请求
|
||||
message ItemsUseItemReq {
|
||||
string GridId = 1; //格子Id
|
||||
uint32 Amount = 2; //使用数量
|
||||
}
|
||||
|
||||
//使用物品请求 回应
|
||||
message ItemsUseItemResp {
|
||||
string GridId = 1; //格子Id
|
||||
uint32 Amount = 2; //使用数量
|
||||
bool issucc = 3; //是否成功
|
||||
}
|
||||
|
||||
//出售道具请求sailitem
|
||||
message ItemsSellItemReq {
|
||||
string GridId = 1; //格子Id
|
||||
string ItemId = 2; //物品Id
|
||||
uint32 Amount = 3; //使用数量
|
||||
}
|
||||
|
||||
//出售道具请求 回应
|
||||
message ItemsSellItemResp {
|
||||
string GridId = 1; //格子Id
|
||||
uint32 Amount = 2; //使用数量
|
||||
bool issucc = 3; //是否成功
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
import "comm.proto";
|
||||
|
||||
message DBMailData {
|
||||
string ObjId = 1; // @go_tags(`bson:"_id"`) ID
|
||||
string Uid = 2;
|
||||
string Title = 3; // 邮件标题
|
||||
string Contex = 4; // 邮件内容
|
||||
uint64 CreateTime = 5; // 发送时间
|
||||
uint64 DueTime = 6; // 过期时间
|
||||
bool Check = 7; // 是否查看
|
||||
bool Reward = 8; // 附件领取状态
|
||||
repeated UserAssets Items = 9; // 附件
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
import "mail/mail_db.proto";
|
||||
|
||||
message MailGetListReq {
|
||||
|
||||
}
|
||||
|
||||
// 查询邮件信息
|
||||
message MailGetListResp {
|
||||
repeated DBMailData Mails = 1;
|
||||
}
|
||||
|
||||
// 查看邮件
|
||||
message MailReadMailReq {
|
||||
string ObjID = 1;
|
||||
}
|
||||
|
||||
message MailReadMailResp {
|
||||
DBMailData Mail = 1;
|
||||
}
|
||||
|
||||
// 领取附件
|
||||
message MailGetUserMailAttachmentReq {
|
||||
string ObjID = 1;
|
||||
}
|
||||
|
||||
message MailGetUserMailAttachmentResp {
|
||||
DBMailData Mail = 1;
|
||||
}
|
||||
|
||||
// 删除某个邮件
|
||||
message MailDelMailReq {
|
||||
string ObjID = 1;
|
||||
}
|
||||
|
||||
message MailDelMailResp {
|
||||
string ObjID = 1; // 返回删除邮件id
|
||||
}
|
||||
|
||||
// 推送邮件
|
||||
message MailGetNewMailPush{
|
||||
DBMailData Mail = 1; // 推送新的邮件信息
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
|
||||
message DBMainline {
|
||||
string id = 1; //@go_tags(`bson:"_id"`) ID
|
||||
string uid = 2; //@go_tags(`bson:"uid"`) 用户ID
|
||||
int32 chapterId = 3; //@go_tags(`bson:"chapterId"`) 章节ID
|
||||
int32 mainlineId = 4; //@go_tags(`bson:"mainlineId"`) 主线关卡ID
|
||||
int32 awaredID = 5; //@go_tags(`bson:"awaredID"`) 是否领奖(设置int是考虑后续扩展有多个宝箱情况)
|
||||
repeated int32 branchID = 6; // @go_tags(`bson:"branchID"`) 记录分支通关的情况
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
import "mainline/mainline_db.proto";
|
||||
|
||||
// 查询关卡进度
|
||||
message MainlineGetListReq {
|
||||
|
||||
}
|
||||
// 返回进度信息
|
||||
message MainlineGetListResp {
|
||||
repeated DBMainline data = 1;
|
||||
}
|
||||
|
||||
// 领取关卡宝箱
|
||||
message MainlineGetRewardReq {
|
||||
string chapterObj = 1; // 章节唯一对象id
|
||||
}
|
||||
|
||||
message MainlineGetRewardResp {
|
||||
DBMainline data = 1; //当前章节信息
|
||||
}
|
||||
|
||||
// 挑战关卡
|
||||
message MainlineChallengeReq {
|
||||
string chapterObj = 1; // 章节唯一对象id
|
||||
uint32 mainlineId = 2; // 小关ID
|
||||
}
|
||||
|
||||
message MainlineChallengeResp {
|
||||
DBMainline data = 1; //当前章节信息
|
||||
}
|
||||
|
||||
// 推送新章节
|
||||
message MainlineNewChapterPush{
|
||||
DBMainline data = 1;
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
|
||||
//系统公告数据结构
|
||||
message DBSystemNotify {
|
||||
string id = 1; //数据公告Id
|
||||
string title = 2; //公告标题
|
||||
string content = 3; //公告内容
|
||||
bool istop = 4; //是否置顶
|
||||
int64 ctime = 5; //创建时间
|
||||
int64 rtime = 6; //发布时间
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
import "errorcode.proto";
|
||||
import "notify/notify_db.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
|
||||
//统一错误码推送
|
||||
message NotifyErrorNotifyPush {
|
||||
string ReqMainType = 1; // 请求协议模块 模块名 例如:user 对应项目中 user的模块
|
||||
string ReqSubType = 2; // 请求协议函数 例如:login 对应项目中 user的模块中
|
||||
// api_login 的处理函数
|
||||
ErrorCode Code = 3; // 执行返回错误码 对应 errorcode.proto 枚举
|
||||
string Message = 4; // 错误消息
|
||||
google.protobuf.Any arg = 5; //参数信息
|
||||
google.protobuf.Any Data = 6; // 错误数据
|
||||
}
|
||||
|
||||
//获取系统公告 请求
|
||||
message NotifyGetListReq {}
|
||||
|
||||
//获取系统公告 回应
|
||||
message NotifyGetListResp {
|
||||
int64 LastReadTime = 1; //最后一次阅读时间
|
||||
repeated DBSystemNotify SysNotify = 2; //公告列表
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
|
||||
enum ShopType {
|
||||
Null = 0;
|
||||
GoldShop = 1;
|
||||
DiamondShop = 2;
|
||||
PVPShop = 3;
|
||||
PVEShop = 4;
|
||||
AllianceShop = 5;
|
||||
}
|
||||
|
||||
message UserShopData {
|
||||
int64 LastRefreshTime = 1; //最后一次刷新时间
|
||||
int32 ManualRefreshNum = 2; //手动刷新次数
|
||||
repeated int32 Items = 3; //商品列表
|
||||
}
|
||||
|
||||
message DBShop {
|
||||
string id = 1; //@go_tags(`bson:"_id"`) 装备id
|
||||
string uid = 2; //@go_tags(`bson:"uid"`) 装备id
|
||||
UserShopData goldShop = 3; //@go_tags(`bson:"goldShop"`)金币商店数据
|
||||
UserShopData diamondShop = 4; //@go_tags(`bson:"diamondShop"`)金币商店数据
|
||||
UserShopData pvpShop = 5; //@go_tags(`bson:"pvpShop"`)金币商店数据
|
||||
UserShopData pveShop = 6; //@go_tags(`bson:"pveShop"`)金币商店数据
|
||||
UserShopData allianceShop = 7; //@go_tags(`bson:"allianceShop"`)金币商店数据
|
||||
}
|
||||
|
||||
message DBShopItem {
|
||||
string id = 1; //@go_tags(`bson:"_id"`) 装备id
|
||||
string uid = 2; //@go_tags(`bson:"uid"`) 装备id
|
||||
int32 goodsId = 3; //@go_tags(`bson:"goodsId"`)商品Id
|
||||
map<int32,int32> buyNum = 4; //@go_tags(`bson:"buyNum"`)购买数量
|
||||
map<int32,int64> lastBuyTime = 5; //@go_tags(`bson:"lastBuyTime"`)最后一次购买的时间
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
import "shop/shop_db.proto";
|
||||
import "comm.proto";
|
||||
|
||||
|
||||
//商品对象数据
|
||||
message ShopItem {
|
||||
int32 GoodsId = 1; //商品Id
|
||||
repeated UserAssets Items = 2; //货物
|
||||
repeated UserAssets Consume = 3; //消耗
|
||||
int32 Sale = 4; //打折
|
||||
int32 LeftBuyNum = 5; //还可购买次数
|
||||
}
|
||||
|
||||
//获取装备列表请求
|
||||
message ShopGetListReq {
|
||||
ShopType sType = 1; //商城类型
|
||||
bool IsManualRefresh = 2; //是否手动刷新
|
||||
}
|
||||
|
||||
//获取装备列表请求
|
||||
message ShopGetListResp {
|
||||
repeated ShopItem Goods = 1; //商品列表
|
||||
}
|
||||
|
||||
//购买商品 请求
|
||||
message ShopBuyReq {
|
||||
ShopType ShopType = 1; //商店类型
|
||||
int32 GoodsId = 2; //商品Id
|
||||
}
|
||||
|
||||
//购买商品 回应
|
||||
message ShopBuyResp {
|
||||
bool IsSucc = 1; //是否成功
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
|
||||
message DBTask {
|
||||
string id = 1; //@go_tags(`bson:"_id"`) ID
|
||||
string uid = 2; //@go_tags(`bson:"uid"`) 用户ID
|
||||
int32 taskId = 3; //@go_tags(`bson:"taskId"`) 任务Id
|
||||
int32 tag = 4; //@go_tags(`bson:"tag"`) 标签
|
||||
int32 progress = 5; //@go_tags(`bson:"progress"`) 任务进度/完成次数
|
||||
int32 active = 6; //@go_tags(`bson:"active"`) 活跃度
|
||||
int32 status = 7; //@go_tags(`bson:"status"`) 任务状态 默认0未完成 1已完成
|
||||
int32 received = 8; //@go_tags(`bson:"received"`) 领取状态 默认0未领取 1已领取
|
||||
int32 typeId = 9; //@go_tags(`bson:"typeId"`)
|
||||
}
|
||||
|
||||
message DBTaskActive {
|
||||
string id = 1; //@go_tags(`bson:"_id"`) ID
|
||||
string uid = 2; //@go_tags(`bson:"uid"`) 用户ID
|
||||
int32 rId = 3; //@go_tags(`bson:"taskId"`) rewardId
|
||||
int32 tag = 4; //@go_tags(`bson:"tag"`) 标签
|
||||
int32 received = 5; //@go_tags(`bson:"received"`) 领取状态 默认0未领取 1已领取
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
import "task/task_db.proto";
|
||||
|
||||
//领取
|
||||
message TaskReceiveReq {
|
||||
int32 taskTag = 1; // 1日常/2周常/3成就
|
||||
string id = 2; //任务唯一ID
|
||||
}
|
||||
|
||||
message TaskReceiveResp {
|
||||
int32 taskId = 1; //任务配置ID
|
||||
}
|
||||
|
||||
//任务列表
|
||||
message TaskListReq {
|
||||
int32 taskTag = 1; //日常/周常/成就
|
||||
}
|
||||
|
||||
message TaskListResp { repeated DBTask list = 1; }
|
||||
|
||||
//活跃度
|
||||
message TaskActiveListReq { int32 taskTag = 1; }
|
||||
message TaskActiveListResp {
|
||||
repeated DBTaskActive list = 1; //活跃度列表
|
||||
int32 active = 2; //活跃度值
|
||||
}
|
||||
|
||||
//活跃度领取
|
||||
message TaskActiveReceiveReq {
|
||||
int32 taskTag = 1; // 1日常/2周常
|
||||
string id = 2; //唯一id
|
||||
}
|
||||
message TaskActiveReceiveResp {
|
||||
int32 taskTag = 1;
|
||||
string id = 2;
|
||||
}
|
||||
|
||||
//攻略
|
||||
message TaskDoStrategyReq {
|
||||
int32 heroCfgId = 1; //英雄ID
|
||||
}
|
||||
|
||||
message TaskDoStrategyResp {
|
||||
repeated int32 taskIds = 1; //任务ID
|
||||
}
|
||||
|
||||
//任务完成推送
|
||||
message TaskFinishedPush {
|
||||
int32 taskId = 1;
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
|
||||
message CacheUser {
|
||||
string uid = 1; //@go_tags(`json:"uid"`) 用户id
|
||||
string SessionId = 2; //@go_tags(`json:"sessionId"`) 会话id
|
||||
string ServiceTag = 3; //@go_tags(`json:"serviceTag"`) 所在服务集群 区服id
|
||||
string GatewayServiceId = 4; //@go_tags(`json:"gatewayServiceId"`) 所在网关服务id
|
||||
string ip = 5; //@go_tags(`json:"ip"`) 远程ip
|
||||
}
|
||||
|
||||
message DBUser {
|
||||
string id = 1; //@go_tags(`bson:"_id"`) ID
|
||||
string uid = 2; //@go_tags(`bson:"uid"`) 用户ID
|
||||
string uuid = 3; //@go_tags(`bson:"uuid"`) 玩家唯一uuid
|
||||
string binduid = 4; //@go_tags(`bson:"binduid"`) 玩家账号
|
||||
string name = 5; //@go_tags(`bson:"name"`) 玩家名
|
||||
int32 sid = 6; //@go_tags(`bson:"sid"`) 区服id
|
||||
string createip = 7; //@go_tags(`bson:"createip"`) 创建账号时的ip
|
||||
string lastloginip = 8; //@go_tags(`bson:"lastloginip"`) 最后一次登录时的ip
|
||||
int64 ctime = 9; //@go_tags(`bson:"ctime"`) 玩家创号时间戳
|
||||
int64 logintime = 10; //@go_tags(`bson:"logintime"`) 最后一次登录时间
|
||||
int32 friendPoint = 11; //@go_tags(`bson:"friendPoint"`) 友情点
|
||||
int32 avatar = 12; //@go_tags(`bson:"avatar"`) 头像
|
||||
int32 gold = 13; //@go_tags(`bson:"gold"`) 金币
|
||||
int32 exp = 14; //@go_tags(`bson:"exp"`) 经验
|
||||
bool created = 15; //@go_tags(`bson:"created"`) 创角
|
||||
int32 lv = 16; //@go_tags(`bson:"lv"`) 等级
|
||||
int32 vip = 17; //@go_tags(`bson:"vip"`) vip
|
||||
int32 diamond = 18; //@go_tags(`bson:"diamond"`) 钻石
|
||||
int32 title = 19; //@go_tags(`bson:"title"`)头衔
|
||||
}
|
||||
|
||||
message DBUserSetting {
|
||||
string uid = 2; //@go_tags(`bson:"uid"`) 用户ID
|
||||
uint32 huazhi = 3; //@go_tags(`bson:"huazhi"`) 画质 0极致 1精致 2正常 3流畅
|
||||
uint32 kangjuchi = 4; //@go_tags(`bson:"kangjuchi"`) 抗锯齿 0 1 2 3
|
||||
bool gaoguang = 5; //@go_tags(`bson:"gaoguang"`) 高光
|
||||
bool wuli = 6; //@go_tags(`bson:"wuli"`) 物理模拟
|
||||
bool music = 7; //@go_tags(`bson:"music"`) 音乐
|
||||
bool effect = 8; //@go_tags(`bson:"effect"`) 音效
|
||||
|
||||
bool guaji = 9; //@go_tags(`bson:"guaji"`) 挂机
|
||||
bool fuben = 10; //@go_tags(`bson:"fuben"`) 特殊副本重置
|
||||
bool tansuo = 11; //@go_tags(`bson:"tansuo"`) 蜂窝探索
|
||||
bool huodong = 12; //@go_tags(`bson:"huodong"`) 特殊活动开启
|
||||
bool xuanshang = 13; //@go_tags(`bson:"wanfa"`)悬赏玩法重置
|
||||
bool saiji = 14; //@go_tags(`bson:"wanfa"`)格斗场玩法赛季重置
|
||||
}
|
@ -1,102 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
import "errorcode.proto";
|
||||
import "user/user_db.proto";
|
||||
import "comm.proto";
|
||||
import "userexpand.proto";
|
||||
|
||||
//用户登录
|
||||
message UserLoginReq {
|
||||
string account = 1; //账号
|
||||
int32 sid = 2; //区服编号
|
||||
}
|
||||
|
||||
message UserLoginResp {
|
||||
DBUser data = 1;
|
||||
DBUserExpand ex = 2; //用户扩展
|
||||
}
|
||||
|
||||
//登出
|
||||
message UserLogoutReq {}
|
||||
|
||||
message UserLogoutResp {}
|
||||
|
||||
//注册
|
||||
message UserRegisterReq {
|
||||
string account = 1;
|
||||
int32 sid = 2;
|
||||
}
|
||||
|
||||
message UserRegisterResp {
|
||||
ErrorCode Code = 1;
|
||||
string account = 2;
|
||||
}
|
||||
|
||||
message UserLoadResp { CacheUser data = 1; }
|
||||
|
||||
//创角
|
||||
message UserCreateReq {
|
||||
string NickName = 1; //昵称
|
||||
}
|
||||
|
||||
message UserCreateResp {
|
||||
bool IsSucc = 1;
|
||||
}
|
||||
|
||||
//添加用户资源
|
||||
message UserAddResReq {
|
||||
UserAssets res = 1; //资源类型
|
||||
}
|
||||
|
||||
message UserAddResResp {
|
||||
UserAssets res = 1; //资源类型
|
||||
}
|
||||
|
||||
// 玩家资源变更推送
|
||||
message UserResChangePush {
|
||||
int32 gold = 1; //@go_tags(`bson:"gold"`) 金币
|
||||
int32 exp = 2; //@go_tags(`bson:"exp"`) 经验
|
||||
int32 lv = 3; //@go_tags(`bson:"lv"`) 等级
|
||||
int32 vip = 4; //@go_tags(`bson:"vip"`) vip
|
||||
int32 diamond = 5; //@go_tags(`bson:"diamond"`) 钻石
|
||||
}
|
||||
|
||||
//用户设置获取
|
||||
message UserGetSettingReq {}
|
||||
|
||||
message UserGetSettingResp {
|
||||
DBUserSetting setting = 1; //用户设置
|
||||
}
|
||||
|
||||
// 更新用户设置
|
||||
message UserUpdateSettingReq { DBUserSetting setting = 1; }
|
||||
message UserUpdateSettingResp {}
|
||||
|
||||
// 初始化验证码
|
||||
message UserVeriCodeReq {}
|
||||
message UserVeriCodeResp {
|
||||
int32 code = 1; //验证码
|
||||
}
|
||||
|
||||
//初始化用户数据
|
||||
message UserInitdataReq {
|
||||
int32 code = 1; //验证码
|
||||
}
|
||||
message UserInitdataResp {}
|
||||
|
||||
//修改玩家名字
|
||||
message UserModifynameReq {
|
||||
string name = 1; //玩家名称
|
||||
}
|
||||
message UserModifynameResp {
|
||||
string uid = 1;
|
||||
uint32 count = 2; //剩余修改次数
|
||||
}
|
||||
|
||||
message UserGetTujianReq{
|
||||
|
||||
}
|
||||
|
||||
message UserGetTujianResp{
|
||||
repeated string heroids = 1;
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
|
||||
//用户扩展数据
|
||||
message DBUserExpand {
|
||||
string id = 1; //主键id
|
||||
string uid = 2; //用户id
|
||||
int64 lastreadnotiftime = 3; //最后阅读公告时间
|
||||
int64 lastInitdataTime = 4; //上次初始数据时间
|
||||
uint32 initdataCount = 5; //今日初始累计次数
|
||||
int32 chatchannel = 6; //跨服聊天频道
|
||||
int32 modifynameCount = 7; //修改昵称次数
|
||||
map<string,bool> tujian = 8; // 图鉴
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
|
||||
message Floor{ // 记录阵型保底数据
|
||||
int32 h4 = 1; // 4星次数
|
||||
int32 h5 = 2; // 5星次数
|
||||
}
|
||||
|
||||
//用户扩展数据
|
||||
message DBUserRecord {
|
||||
string id = 1; //@go_tags(`bson:"_id"`) ID 主键id
|
||||
string uid = 2; //@go_tags(`bson:"uid"`) 用户ID
|
||||
Floor race0 = 3; // 普通卡池
|
||||
Floor race1 = 4; // 阵型1卡池
|
||||
Floor race2 = 5; // 阵型2卡池
|
||||
Floor race3 = 6; // 阵型3卡池
|
||||
Floor race4 = 7; // 阵型4卡池
|
||||
int32 triggernum = 8; // 活动数据 存放没有触发次数
|
||||
int32 activityid = 9; // 活动id
|
||||
int64 mtime = 10; // 修改时间
|
||||
}
|
Loading…
Reference in New Issue
Block a user