挪到子仓库中

This commit is contained in:
liuxiaobo 2025-06-20 23:02:19 +08:00
parent fb1604a3d7
commit 6c398693c9
11 changed files with 0 additions and 595 deletions

View File

@ -1,29 +0,0 @@
syntax = "proto3";
package pb;
option go_package = "common/proto/pb";
import "user.proto";
import "service.proto";
//
enum ChatType
{
CT_Unknown = 0;
CT_Private = 1; //
CT_World = 2; //
CT_Marquee = 3; //
}
//
message ReqChat
{
ChatUser srcUser = 1; //
ChatUser dstUser = 2; //
ChatType type = 3; //
ServiceTypeId gameId = 4; // id
string content = 5; //
}

View File

@ -1,17 +0,0 @@
syntax = "proto3";
package pb;
option go_package = "common/proto/pb";
import "service.proto";
message ClientMsg
{
ServiceTypeId service_tid = 1; // id
string service_name = 2; // ()
int64 user_id = 3; // id
int32 msg_id = 4; // id
bytes data = 5; //
}

View File

@ -1,26 +0,0 @@
syntax = "proto3";
package pb;
option go_package = "common/proto/pb";
enum ErrCode
{
OK = 0;
SystemErr = 1; //
ParamErr = 2; //
LoginDiffLoc = 100; //
LoginUserOrPwdErr = 102; //
AccountFrozen = 103; //
AccountBanned = 104; //
RegisterUserExist = 110; //
VersionTooLow = 115; //
Maintain = 120; //
GoldNotEnough = 125; //
NotBetCount = 126; //
NotLeaveRoom = 127; // ()
// color game
TotalBetExceedsLimit = 500; //
AreaBetExceedsLimit = 505; //
}

View File

@ -1,271 +0,0 @@
syntax = "proto3";
package pb;
option go_package = "common/proto/pb";
import "code.proto";
//
enum ColorPrizeArea
{
CPA_Single_0 = 0; //
CPA_Single_1 = 1; //
CPA_Single_2 = 2; //
CPA_Double = 3; //
CPA_Three = 4; //
}
//
message ColorPrizeAreaRange
{
ColorPrizeArea pos = 1; // 0-2
int64 minMul = 2;
int64 maxMul = 3;
}
// color玩法配置信息
message ColorRoomConfig
{
repeated int64 betList = 3; //
repeated ColorPrizeAreaRange mulRangeConfig = 5; //
}
//
enum ColorType
{
CT_Yellow = 0; //
CT_White = 1; //
CT_Pink = 2; //
CT_Blue = 3; //
CT_Red = 4; //
CT_Green = 5; // 绿
}
//
enum ColorBetArea
{
CBA_Yellow = 0; //
CBA_White = 1; //
CBA_Pink = 2; //
CBA_Blue = 3; //
CBA_Red = 4; //
CBA_Green = 5; // 绿
CBA_Yellow2 = 6; //
CBA_White2 = 7; //
CBA_Pink2 = 8; //
CBA_Blue2 = 9; //
CBA_Red2 = 10; //
CBA_Green2 = 11; // 绿
CBA_Yellow3 = 12; //
CBA_White3 = 13; //
CBA_Pink3 = 14; //
CBA_Blue3 = 15; //
CBA_Red3 = 16; //
CBA_Green3 = 17; // 绿
}
//
enum ColorGameStatus
{
CGS_WaitStart = 0; //
CGS_Start = 1; //
CGS_Betting = 2; //
CGS_BetEnd = 3; //
CGS_OpenThreeDice = 4; //
CGS_Settle = 5; //
}
//
message ColorRoomWaitStart
{
NtfColorTrend Trends = 1; //
}
//
message ColorRoomStart
{
NtfColorGameStart start = 1;
NtfColorTrend Trends = 2; //
}
//
message ColorRoomBetting
{
NtfColorBetAreaInfo betAreaInfo = 1; //
}
//
message ColorRoomEndBet
{
NtfColorEndBetting areaMul = 1; //
NtfColorBetAreaInfo betAreaInfo = 2; //
NtfColorBigUser bigUser = 3; //
}
//
message ColorRoomOpenThreeDice
{
NtfColorOpenThreeDice dices = 1;
}
//
message ColorRoomSettle
{
NtfColorSettle settle = 1;
}
//
message NtfColorRoomInfo
{
ColorGameStatus status = 1;
int64 endTime = 2; //
ColorRoomConfig config = 101; //
ColorUser user = 100;
ColorRoomWaitStart waitStart = 3; //
ColorRoomStart start = 4;
ColorRoomBetting betting = 5;
ColorRoomEndBet endBet = 6;
ColorRoomOpenThreeDice openThreeDice = 7;
ColorRoomSettle settle = 8;
}
message NtfColorGameStart
{
int64 endTime = 1; // 3endTime = statusTime+3
int64 jackpot = 2; // jackpot池
}
message NtfColorBetting
{
int64 endTime = 1; //
}
message ReqColorBetting
{
ColorBetArea area = 1;
int64 bet = 2;
}
message RspColorBetting
{
ErrCode code = 1;
ColorBetAreaInfo areaInfo = 2;
}
message ColorBetAreaInfo
{
ColorBetArea area = 1; //
int64 totalBet = 2; //
int32 playerNum = 3; //
int64 myBet = 4; //
}
//
message NtfColorBetAreaInfo
{
repeated ColorBetAreaInfo areaInfos = 1;
}
//
enum ColorPrizeType
{
CPT_Normal = 0; //
CPT_Big = 1; //
CPT_Jackpot = 2; // jackpot奖
}
//
message ColorBetAreaMul
{
ColorBetArea area = 1; //
ColorPrizeArea prizeArea = 2; //
ColorPrizeType prizeType = 3; //
int64 mul = 4; //
}
//
message NtfColorEndBetting
{
int64 endTime = 1; //
repeated ColorBetAreaMul areaMul = 2; //
int64 jackpot = 3; // jackpot值
}
message NtfColorOpenThreeDice
{
repeated ColorType color = 1; // 3
int32 aniRouteIndex = 3; //
repeated ColorBetArea winArea = 4; //
}
//
message NtfColorSettle
{
message UserBetAreaMul
{
ColorBetAreaMul areaMul = 1;
int64 bet = 2; //
int64 win = 3; //
int64 realWin = 4; //
}
repeated UserBetAreaMul userAreaWin = 1; //
repeated ColorType threeDice = 2; //
int64 totalWin = 3; // ,
int64 totalBet = 4; //
int64 totalWinBaseBet = 6; //
int64 tax = 5; //
}
//
message ColorUser {
string Nick = 1; //
string Head = 2; //
int64 Score = 3; //
int32 SeatId = 4; //id
int64 UserID = 5; //ID
}
//
message NtfColorBigUser
{
repeated ColorBigUser bigUser = 34; //
}
//
message NtfColorTrend
{
message ColorRate
{
ColorType color = 1;
int32 rate = 2;
}
repeated ColorRate colorRate = 1; // 30
}
// 6
message ColorBigUser
{
string nickName = 5; //
string avatar = 2;
int64 winChips = 1; //
repeated int64 areaId = 3; // (6)
}
//
message NtfColorMaintain
{
string msg = 2; //
int64 gold = 3; //
}

View File

@ -1,45 +0,0 @@
syntax = "proto3";
package pb;
option go_package = "common/proto/pb";
import "code.proto";
//
message NtfKickOutUser
{
ErrCode code = 1; //
}
//
// 线lobby服查找玩家在哪个玩法服并通知给玩家
// ReqEnterRoom进入对应玩法服
message ReqEnterRoom
{
}
//
message RspEnterRoom
{
ErrCode code = 1;
int32 gameId = 2; // id
int32 roomType = 3; // ,
}
//
message ReqLeaveRoom
{
}
message RspLeaveRoom
{
ErrCode code = 1;
}
//
message NtfPayoutFail
{
ErrCode code = 1;
}

View File

@ -1,7 +0,0 @@
#!/bin/bash
protoc -I=. --proto_path=./ --go_out=../../ *.proto
echo "success"

View File

@ -1,51 +0,0 @@
syntax = "proto3";
package pb;
option go_package = "common/proto/pb";
import "code.proto";
//
message ReqUserLogin
{
string username = 1; //
string password = 2; // token
string ip = 3;
string device_id = 4; // id
string version = 10; //
}
message RspUserLogin
{
ErrCode code = 1;
int64 user_id = 2;
string token = 3; // token
}
// 线
message NtfUserOnline
{
int64 user_id = 2; // id
}
// 便使
message NtfUserInService
{
repeated string serviceNames = 3; //
}
//
message ReqUserLogout
{
}
message RspUserLogout
{
ErrCode code = 1; //
}
// 线
message NtfUserOffline
{
int64 user_id = 2; // id
}

View File

@ -1,37 +0,0 @@
syntax = "proto3";
package pb;
option go_package = "common/proto/pb";
import "code.proto";
import "user.proto";
import "service.proto";
//
message ReqMatchRoom
{
ServiceTypeId gameId = 1; // id
int32 roomType = 2; // ,
}
// NotifyUserEnterRoom才是真房间
message RspMatchRoom
{
// color玩法配置信息
message ColorInfo
{
}
ErrCode code = 1;
ServiceTypeId gameId = 2; // id
int32 roomType = 3; // ,
GameUser User = 4; //
ColorInfo colorInfo = 20; // color玩法配置信息
}
message NotifyUserEnterRoom
{
repeated GameUser User = 1; // 广
}

View File

@ -1,56 +0,0 @@
syntax = "proto3";
package pb;
option go_package = "common/proto/pb";
/*
:
1. id都在msgId.proto的MsgId中定义Req,Rsp,Ntf三种之一Id
2. code.proto的ErrCode中定义
3. id去掉后缀Id组成
*/
enum MsgId
{
MI_Unknown = 0;
NtfMaintainId = 1000; //
NtfKickOutUserId = 1001; //
ReqEnterRoomId = 1002; //
RspEnterRoomId = 1003;
ReqLeaveRoomId = 1004; //
RspLeaveRoomId = 1005;
NtfPayoutFailId = 1010; //
// 2000-2099
ReqChatId = 2000; //
RspChatId = 2001; // C2SChatMsg
// 2100-2199
ReqUserLoginId = 2100; //
RspUserLoginId = 2101;
NtfUserOnlineId = 2102;
NtfUserInServiceId = 2103; // 便
ReqUserLogoutId = 2104;
RspUserLogoutId = 2105;
NtfUserOfflineId = 2106;
// 2200-2299
ReqMatchRoomId = 2200; //
RspMatchRoomId = 2201;
NtfUserEnterRoomId = 2202; //
// color game 2300-2399
NtfColorRoomInfoId = 2300; //
NtfColorGameStartId = 2305; //
NtfColorBettingId = 2310; //
ReqColorBettingId = 2315; //
RspColorBettingId = 2320;
NtfColorBetAreaInfoId = 2325; //
NtfColorEndBettingId = 2330; //
NtfColorOpenThreeDiceId = 2335; //
NtfColorSettleId = 2340; //
NtfColorBigUserId = 2345; //
NtfColorTrendId = 2350; //
}

View File

@ -1,26 +0,0 @@
syntax = "proto3";
package pb;
option go_package = "common/proto/pb";
// 10000-99999
// :10000-19999
// :20000-29999
// :30000-39999
enum ServiceTypeId
{
STI_Unknown = 0;
//
STI_Login = 10000; //
STI_Chat = 10005; //
STI_Match = 10010; //
STI_Lobby = 10015; //
//
STI_Gate = 20000; // id
STI_ColorGame = 20005; // color game
//
STI_DB = 30000; // db服
}

View File

@ -1,30 +0,0 @@
syntax = "proto3";
package pb;
option go_package = "common/proto/pb";
//
message ChatUser
{
int64 userId = 1;
string nickname = 2; //
string avatar = 3; //
string avatarFrame = 4; //
string vipLevel = 5; // vip等级
}
//
message GameUser
{
int64 userId = 1;
string nickname = 2; //
string avatar = 3; //
string avatarFrame = 4; //
int32 vipLevel = 5; // vip等级
int32 vipExp = 6; // vip经验
int64 seat = 20; //
int64 gold = 25; //
}