上传pb测试工具代码
This commit is contained in:
parent
67a97720ef
commit
b4007d4b97
334
src/pb/proto.js
334
src/pb/proto.js
@ -1817,6 +1817,135 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
DBHunting: {
|
||||||
|
fields: {
|
||||||
|
id: {
|
||||||
|
type: "string",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
uid: {
|
||||||
|
type: "string",
|
||||||
|
id: 2
|
||||||
|
},
|
||||||
|
challengeCount: {
|
||||||
|
type: "int32",
|
||||||
|
id: 3
|
||||||
|
},
|
||||||
|
boos: {
|
||||||
|
keyType: "int32",
|
||||||
|
type: "int32",
|
||||||
|
id: 4
|
||||||
|
},
|
||||||
|
buyCount: {
|
||||||
|
type: "int32",
|
||||||
|
id: 5
|
||||||
|
},
|
||||||
|
cTime: {
|
||||||
|
type: "int64",
|
||||||
|
id: 6
|
||||||
|
},
|
||||||
|
challengeTime: {
|
||||||
|
keyType: "int32",
|
||||||
|
type: "int32",
|
||||||
|
id: 7
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
DBHuntingRank: {
|
||||||
|
fields: {
|
||||||
|
id: {
|
||||||
|
type: "string",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
uid: {
|
||||||
|
type: "string",
|
||||||
|
id: 2
|
||||||
|
},
|
||||||
|
difficulty: {
|
||||||
|
type: "int32",
|
||||||
|
id: 3
|
||||||
|
},
|
||||||
|
bosstype: {
|
||||||
|
type: "int32",
|
||||||
|
id: 4
|
||||||
|
},
|
||||||
|
nickname: {
|
||||||
|
type: "string",
|
||||||
|
id: 5
|
||||||
|
},
|
||||||
|
icon: {
|
||||||
|
type: "string",
|
||||||
|
id: 6
|
||||||
|
},
|
||||||
|
lv: {
|
||||||
|
type: "int32",
|
||||||
|
id: 7
|
||||||
|
},
|
||||||
|
costTime: {
|
||||||
|
type: "int32",
|
||||||
|
id: 8
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HuntingGetListReq: {
|
||||||
|
fields: {}
|
||||||
|
},
|
||||||
|
HuntingGetListResp: {
|
||||||
|
fields: {
|
||||||
|
data: {
|
||||||
|
type: "DBHunting",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HuntingChallengeReq: {
|
||||||
|
fields: {
|
||||||
|
bossType: {
|
||||||
|
type: "int32",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
difficulty: {
|
||||||
|
type: "int32",
|
||||||
|
id: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HuntingChallengeResp: {
|
||||||
|
fields: {
|
||||||
|
data: {
|
||||||
|
type: "DBHunting",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HuntingBuyReq: {
|
||||||
|
fields: {
|
||||||
|
count: {
|
||||||
|
type: "int32",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HuntingBuyResp: {
|
||||||
|
fields: {
|
||||||
|
data: {
|
||||||
|
type: "DBHunting",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HuntingRankListReq: {
|
||||||
|
fields: {}
|
||||||
|
},
|
||||||
|
HuntingRankListResp: {
|
||||||
|
fields: {
|
||||||
|
ranks: {
|
||||||
|
rule: "repeated",
|
||||||
|
type: "DBHuntingRank",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
DB_UserItemData: {
|
DB_UserItemData: {
|
||||||
fields: {
|
fields: {
|
||||||
gridId: {
|
gridId: {
|
||||||
@ -2290,6 +2419,82 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
DBMoonfantasy: {
|
||||||
|
fields: {
|
||||||
|
id: {
|
||||||
|
type: "string",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
uid: {
|
||||||
|
type: "string",
|
||||||
|
id: 2
|
||||||
|
},
|
||||||
|
monster: {
|
||||||
|
type: "int32",
|
||||||
|
id: 3
|
||||||
|
},
|
||||||
|
ctime: {
|
||||||
|
type: "int64",
|
||||||
|
id: 4
|
||||||
|
},
|
||||||
|
joinnum: {
|
||||||
|
type: "int32",
|
||||||
|
id: 5
|
||||||
|
},
|
||||||
|
numup: {
|
||||||
|
type: "int32",
|
||||||
|
id: 6
|
||||||
|
},
|
||||||
|
unitmup: {
|
||||||
|
type: "int32",
|
||||||
|
id: 7
|
||||||
|
},
|
||||||
|
record: {
|
||||||
|
keyType: "string",
|
||||||
|
type: "int32",
|
||||||
|
id: 8
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
MoonfantasyTriggerReq: {
|
||||||
|
fields: {}
|
||||||
|
},
|
||||||
|
MoonfantasyTriggerResp: {
|
||||||
|
fields: {
|
||||||
|
issucc: {
|
||||||
|
type: "bool",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
mid: {
|
||||||
|
type: "string",
|
||||||
|
id: 2
|
||||||
|
},
|
||||||
|
monster: {
|
||||||
|
type: "int32",
|
||||||
|
id: 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
MoonfantasyDareReq: {
|
||||||
|
fields: {
|
||||||
|
uid: {
|
||||||
|
type: "string",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
mid: {
|
||||||
|
type: "string",
|
||||||
|
id: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
MoonfantasyDareResp: {
|
||||||
|
fields: {
|
||||||
|
issucc: {
|
||||||
|
type: "bool",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
DBSystemNotify: {
|
DBSystemNotify: {
|
||||||
fields: {
|
fields: {
|
||||||
id: {
|
id: {
|
||||||
@ -3484,6 +3689,135 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|||||||
id: 13
|
id: 13
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
DBViking: {
|
||||||
|
fields: {
|
||||||
|
id: {
|
||||||
|
type: "string",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
uid: {
|
||||||
|
type: "string",
|
||||||
|
id: 2
|
||||||
|
},
|
||||||
|
challengeCount: {
|
||||||
|
type: "int32",
|
||||||
|
id: 3
|
||||||
|
},
|
||||||
|
boos: {
|
||||||
|
keyType: "int32",
|
||||||
|
type: "int32",
|
||||||
|
id: 4
|
||||||
|
},
|
||||||
|
buyCount: {
|
||||||
|
type: "int32",
|
||||||
|
id: 5
|
||||||
|
},
|
||||||
|
cTime: {
|
||||||
|
type: "int64",
|
||||||
|
id: 6
|
||||||
|
},
|
||||||
|
challengeTime: {
|
||||||
|
keyType: "int32",
|
||||||
|
type: "int32",
|
||||||
|
id: 7
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
DBVikingRank: {
|
||||||
|
fields: {
|
||||||
|
id: {
|
||||||
|
type: "string",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
uid: {
|
||||||
|
type: "string",
|
||||||
|
id: 2
|
||||||
|
},
|
||||||
|
difficulty: {
|
||||||
|
type: "int32",
|
||||||
|
id: 3
|
||||||
|
},
|
||||||
|
bosstype: {
|
||||||
|
type: "int32",
|
||||||
|
id: 4
|
||||||
|
},
|
||||||
|
nickname: {
|
||||||
|
type: "string",
|
||||||
|
id: 5
|
||||||
|
},
|
||||||
|
icon: {
|
||||||
|
type: "string",
|
||||||
|
id: 6
|
||||||
|
},
|
||||||
|
lv: {
|
||||||
|
type: "int32",
|
||||||
|
id: 7
|
||||||
|
},
|
||||||
|
costTime: {
|
||||||
|
type: "int32",
|
||||||
|
id: 8
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
VikingGetListReq: {
|
||||||
|
fields: {}
|
||||||
|
},
|
||||||
|
VikingGetListResp: {
|
||||||
|
fields: {
|
||||||
|
data: {
|
||||||
|
type: "DBViking",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
VikingChallengeReq: {
|
||||||
|
fields: {
|
||||||
|
bossType: {
|
||||||
|
type: "int32",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
difficulty: {
|
||||||
|
type: "int32",
|
||||||
|
id: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
VikingChallengeResp: {
|
||||||
|
fields: {
|
||||||
|
data: {
|
||||||
|
type: "DBViking",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
VikingBuyReq: {
|
||||||
|
fields: {
|
||||||
|
count: {
|
||||||
|
type: "int32",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
VikingBuyResp: {
|
||||||
|
fields: {
|
||||||
|
data: {
|
||||||
|
type: "DBViking",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
VikingRankListReq: {
|
||||||
|
fields: {}
|
||||||
|
},
|
||||||
|
VikingRankListResp: {
|
||||||
|
fields: {
|
||||||
|
ranks: {
|
||||||
|
rule: "repeated",
|
||||||
|
type: "DBVikingRank",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
25
src/pb/proto/hunting_db.proto
Normal file
25
src/pb/proto/hunting_db.proto
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
option go_package = ".;pb";
|
||||||
|
|
||||||
|
|
||||||
|
message DBHunting {
|
||||||
|
string id = 1; //@go_tags(`bson:"_id"`) ID
|
||||||
|
string uid = 2; //@go_tags(`bson:"uid"`) 用户ID
|
||||||
|
int32 challengeCount = 3; //@go_tags(`bson:"challengeCount"`) 挑战次数
|
||||||
|
map<int32,int32> boos = 4; // key boos 类型 value 难度
|
||||||
|
int32 buyCount = 5;//@go_tags(`bson:"buyCount"`) 购买次数
|
||||||
|
int64 cTime = 6; //@go_tags(`bson:"cTime"`) 修改时间
|
||||||
|
map<int32,int32> challengeTime = 7; //@go_tags(`bson:"challengeTime"`) 每个难度通关时间
|
||||||
|
}
|
||||||
|
|
||||||
|
// 狩猎排行榜
|
||||||
|
message DBHuntingRank {
|
||||||
|
string id = 1; //@go_tags(`bson:"_id"`) ID
|
||||||
|
string uid = 2; //@go_tags(`bson:"uid"`) 用户ID
|
||||||
|
int32 difficulty = 3; // 难度
|
||||||
|
int32 bosstype = 4; // boss类型塔类型
|
||||||
|
string nickname = 5;// 昵称
|
||||||
|
string icon = 6; // 玩家头像
|
||||||
|
int32 lv = 7; // 玩家等级
|
||||||
|
int32 costTime = 8; //@go_tags(`bson:"costTime"`) 闯关耗时 单位s
|
||||||
|
}
|
29
src/pb/proto/hunting_msg.proto
Normal file
29
src/pb/proto/hunting_msg.proto
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
option go_package = ".;pb";
|
||||||
|
import "hunting_db.proto";
|
||||||
|
|
||||||
|
message HuntingGetListReq {}
|
||||||
|
|
||||||
|
message HuntingGetListResp { DBHunting data = 1; }
|
||||||
|
|
||||||
|
// 挑战
|
||||||
|
message HuntingChallengeReq {
|
||||||
|
int32 bossType = 1; // boos 类型
|
||||||
|
int32 difficulty = 2; // 难度
|
||||||
|
}
|
||||||
|
|
||||||
|
message HuntingChallengeResp { DBHunting data = 1; }
|
||||||
|
|
||||||
|
// 购买
|
||||||
|
message HuntingBuyReq {
|
||||||
|
int32 count = 1; // 购买次数
|
||||||
|
}
|
||||||
|
|
||||||
|
message HuntingBuyResp { DBHunting data = 1; }
|
||||||
|
|
||||||
|
// 排行榜
|
||||||
|
message HuntingRankListReq {}
|
||||||
|
|
||||||
|
message HuntingRankListResp {
|
||||||
|
repeated DBHuntingRank ranks = 1; // 排行数据 有序的 注意boss类型
|
||||||
|
}
|
13
src/pb/proto/moonfantasy_db.proto
Normal file
13
src/pb/proto/moonfantasy_db.proto
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
option go_package = ".;pb";
|
||||||
|
|
||||||
|
message DBMoonfantasy {
|
||||||
|
string id = 1; //@go_tags(`bson:"_id"`) ID
|
||||||
|
string uid = 2; //用户id
|
||||||
|
int32 monster = 3; //怪物id
|
||||||
|
int64 ctime = 4; //创建时间
|
||||||
|
int32 joinnum = 5; //参与人数
|
||||||
|
int32 numup = 6; //人数上限
|
||||||
|
int32 unitmup = 7; //单人可挑战次数
|
||||||
|
map<string, int32> record = 8; //挑战记录
|
||||||
|
}
|
22
src/pb/proto/moonfantasy_msg.proto
Normal file
22
src/pb/proto/moonfantasy_msg.proto
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
option go_package = ".;pb";
|
||||||
|
|
||||||
|
///触发秘境
|
||||||
|
message MoonfantasyTriggerReq {}
|
||||||
|
|
||||||
|
///触发秘境
|
||||||
|
message MoonfantasyTriggerResp {
|
||||||
|
bool issucc = 1; //是否成功
|
||||||
|
string mid = 2; //唯一id //挑战时需要传递的数据
|
||||||
|
int32 monster = 3; //怪物id
|
||||||
|
}
|
||||||
|
|
||||||
|
///挑战秘境
|
||||||
|
message MoonfantasyDareReq {
|
||||||
|
string uid = 1; //发布者用户id
|
||||||
|
string mid = 2; //唯一id
|
||||||
|
}
|
||||||
|
|
||||||
|
message MoonfantasyDareResp {
|
||||||
|
bool issucc = 1; //是否成功
|
||||||
|
}
|
25
src/pb/proto/viking_db.proto
Normal file
25
src/pb/proto/viking_db.proto
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
option go_package = ".;pb";
|
||||||
|
|
||||||
|
//维京远征
|
||||||
|
message DBViking {
|
||||||
|
string id = 1; //@go_tags(`bson:"_id"`) ID
|
||||||
|
string uid = 2; //@go_tags(`bson:"uid"`) 用户ID
|
||||||
|
int32 challengeCount = 3; //@go_tags(`bson:"challengeCount"`) 挑战次数
|
||||||
|
map<int32,int32> boos = 4; // key boos 类型 value 难度
|
||||||
|
int32 buyCount = 5;//@go_tags(`bson:"buyCount"`) 购买次数
|
||||||
|
int64 cTime = 6; //@go_tags(`bson:"cTime"`) 修改时间
|
||||||
|
map<int32,int32> challengeTime = 7; //@go_tags(`bson:"challengeTime"`) 每个难度通关时间
|
||||||
|
}
|
||||||
|
|
||||||
|
// 维京远征排行榜
|
||||||
|
message DBVikingRank {
|
||||||
|
string id = 1; //@go_tags(`bson:"_id"`) ID
|
||||||
|
string uid = 2; //@go_tags(`bson:"uid"`) 用户ID
|
||||||
|
int32 difficulty = 3; // 难度
|
||||||
|
int32 bosstype = 4; // boss类型塔类型
|
||||||
|
string nickname = 5;// 昵称
|
||||||
|
string icon = 6; // 玩家头像
|
||||||
|
int32 lv = 7; // 玩家等级
|
||||||
|
int32 costTime = 8; //@go_tags(`bson:"costTime"`) 闯关耗时 单位s
|
||||||
|
}
|
29
src/pb/proto/viking_msg.proto
Normal file
29
src/pb/proto/viking_msg.proto
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
option go_package = ".;pb";
|
||||||
|
import "viking_db.proto";
|
||||||
|
|
||||||
|
message VikingGetListReq {}
|
||||||
|
|
||||||
|
message VikingGetListResp { DBViking data = 1; }
|
||||||
|
|
||||||
|
// 挑战
|
||||||
|
message VikingChallengeReq {
|
||||||
|
int32 bossType = 1; // boos 类型
|
||||||
|
int32 difficulty = 2; // 难度
|
||||||
|
}
|
||||||
|
|
||||||
|
message VikingChallengeResp { DBViking data = 1; }
|
||||||
|
|
||||||
|
// 购买
|
||||||
|
message VikingBuyReq {
|
||||||
|
int32 count = 1; // 购买次数
|
||||||
|
}
|
||||||
|
|
||||||
|
message VikingBuyResp { DBViking data = 1; }
|
||||||
|
|
||||||
|
// 排行榜
|
||||||
|
message VikingRankListReq {}
|
||||||
|
|
||||||
|
message VikingRankListResp {
|
||||||
|
repeated DBVikingRank ranks = 1; // 排行数据 有序的 注意boss类型
|
||||||
|
}
|
@ -220,6 +220,9 @@ export default defineComponent({
|
|||||||
{ mainType: 'martialhall', subs: [] },
|
{ mainType: 'martialhall', subs: [] },
|
||||||
{ mainType: 'gourmet', subs: [] },
|
{ mainType: 'gourmet', subs: [] },
|
||||||
{ mainType: 'smithy', subs: [] },
|
{ mainType: 'smithy', subs: [] },
|
||||||
|
{ mainType: 'moonfantasy', subs: [] },
|
||||||
|
{ mainType: 'viking', subs: [] },
|
||||||
|
{ mainType: 'hunting', subs: [] },
|
||||||
])
|
])
|
||||||
for (const v of Object.keys(proto)) {
|
for (const v of Object.keys(proto)) {
|
||||||
for (const v1 of proto_models) {
|
for (const v1 of proto_models) {
|
||||||
|
Loading…
Reference in New Issue
Block a user