syntax="proto3";
package protos;

// 消息ID < 5000 就地处理或大厅处理
enum MsgId {
	C_Login 				= 0;
	S_Login 				= 1;
	C_Logout				= 3;
	S_Logout				= 4;
	C_Heartbeat				= 5;
	S_Heartbeat				= 6;
	S_HotGames				= 10;
	C_ChildrenItemsOf		= 11;
	S_ChildrenItemsOf		= 12;
	C_EnterGame				= 15;
	S_EnterGame				= 16;
	C_LeaveGame				= 17;
	S_LeaveGame				= 18;
	C_UpdatePassword		= 28;
	S_UpdatePassword		= 29;
	C_UserSettings			= 30;
	S_UserSettings			= 31;
	C_UpdateBankBalance		= 32;
	S_UpdateBankBalance		= 33;
	C_UpdateBankPassword	= 34;
	S_UpdateBankPassword	= 35;
	C_AuthBank				= 36;
	S_AuthBank				= 37;
	C_VerifiCode			= 40;
	S_VerifiCode			= 41;
	C_BindPhone				= 42;
	S_BindPhone				= 43;
	C_BindAlipay			= 44;
	S_BindAlipay			= 45;
	C_PrivateMail			= 50;
	S_PrivateMail			= 51;
	C_RemPrivateMail		= 52;
	S_RemPrivateMail		= 53;
	C_Marquee				= 54;
	C_Activity				= 55;
	S_Activity				= 56;
	C_Notice				= 57;
	S_Notice				= 58;
	C_VIPInfo				= 60;
	S_VIPInfo				= 61;
	C_GetVipBonus			= 62;
	S_GetVipBonus			= 63;
	C_Checkin7				= 70;
	S_Checkin7				= 71;
	C_CheckinGet			= 72;
	S_CheckinGet			= 73;
	C_GameTask				= 74;
	S_GameTask				= 75;
	C_ReceiveReward			= 76;
	S_ReceiveReward			= 77;
	C_Alms 					= 80;
	S_Ntf_Alms				= 81;
	C_AlmsGet				= 82;
	S_AlmsGet				= 83;
	C_Checkin30Status		= 90;
	S_Checkin30Status 		= 91;
	C_GetChechin30 			= 92;
	S_GetCheckin30 			= 93;
	C_GetCheckin30Ext 		= 94;
	S_GetCheckin30Ext 		= 95;

	C_QueryMessage			= 99;
	S_Ntf_ItemsChanged		= 100;
	C_UserBalance			= 101;
	S_Ntf_UserBalance		= 102;
	S_Ntf_UserBank			= 104;
	C_Config				= 25;
	S_Ntf_Config			= 105;
	S_Ntf_NewMessage		= 106;
	S_Ntf_Marquee			= 107;
	S_NtfVipChange			= 108;
	C_Unread				= 109;
	S_Ntf_Unread			= 110;
	S_Ntf_EmergencyNotice   = 120;

	S_Default				= 1000;
	S_Offline				= 1024;

	C_UpdatePasswordV 		= 2049;
	C_TurnTableStatus		= 2050;
	S_TurnTableStatus		= 2051;
	C_TurnTablePlay			= 2052;
	S_TurnTablePlay			= 2053;
	C_TurnTableGet			= 2054;
	S_TurnTableGet			= 2055;
    S_Ntf_RedEnvelope		= 2056;
    C_RedEnvelope			= 2057;
    S_RedEnvelope			= 2058;
}

// 错误代码 和外部通信使用
enum ErrCode {
	OK 				= 0;		// 成功
	PENDING 		= 1;		// 指令已经收到，正在处理
	MAINTAINING		= 2;		// 服务器维护
	TOKEN_ERR		= 6;
	INSUFFICIENT 	= 7;		// 条件不足
	FAILED 			= 9; 		// 执行失败
	EXHANSTED 		= 10; 		// 已用尽
	USER_OFFLINE	= 301;		// 用户不在线
	USER_ONLINE		= 302;		// 用户在线
	VER_MISMATCH	= 303;		// 版本不匹配
	BAD_REQUEST 	= 400;		// 请求有错误，无法处理
	AUTH 			= 401;		// 无权限
	FORBIDDEN 		= 403;		// 被禁止
	CMD_UNSUPPORT 	= 404;		// 请求命令不支持
	UNKNOWN 		= 500;		// 未知
	TARGET_NOT_FOUND 		= 601;		// 没有找到操作目标
	NO_REACTION				= 602;		// 没有响应
	BALANCE_INSUFFICIENT 	= 610;		// 余额不足
	BANK_INSUFFICIENT		= 611;		// 银行余额不足
	LENGTH			= 612;		// 长度错误
	TIMEOUT			= 614;		// 超时，(验证码 表示超时或输入错误)
	OUTDATED		= 615;		// 过期
	BAD_FORMAT		= 701;		// 格式不合法
	OCCUPIED		= 800;		// 已经被使用
	DUP_OPER		= 801;		// 操作重复
	UNBIND			= 806;		// 账号未绑定
}


// 金币变动
enum ReasonBalanceChange {
	REGISTER 		= 0;		// 注册奖励
	LOGIN			= 1;		// 登录
	CHECKIN			= 2;		// 签到
	CHECKIN_BONUS 	= 3;		// 签到额外奖励 118
	BIND_PHONE		= 4;		// 绑定手机号
	TASK			= 6;		// 游戏任务
	DAILY			= 9;		// 日任务
	WEEKLY			= 13;		// 周任务
	MONTHLY			= 16;		// 月任务
	ALMS			= 19;		// 救济金
	TOBANK          = 21;       // 存款
	BANKOUT			= 22; 		// 存取款
	RECHARGE		= 23;		// 充值
	WITHDRAW		= 24;		// 提现
	WITHDRAW_CANCELLED	= 28;	// 提现取消，产生退币操作
	BET				= 25;		// 游戏输赢，这个比较笼统，详细的再说
	MGR_ADD			= 26;		// 管理员操作加钱
	MGR_DEDUC		= 27;		// 管理员扣钱
	VIP		 		= 30;		// VIP 奖励，这里指单次奖励
	VIP_WEEKLY		= 31;		// VIP 周奖励
	VIP_MONTHLY		= 32;		// VIP 月奖励
	PROMOTE			= 33;		// 推广佣金
	TURNTABLE 		= 34;		// 幸运转盘
	REDPACKETS 		= 35;		// 红包
}

// 登出原因
enum ReasonDisconn {
	OFFLINE 	= 0;		// 因网络出错,发送或接受失败
	ERR_DATA 	= 1;		// 传递非法数据,导致关闭连接
	REMOTE 		= 2;		// 客户端主动关闭
	KICK 		= 3;		// 踢掉
	HEARTBEAT 	= 4;		// 心跳超时
	ERR_AUTH 	= 5;		// 格式合法但校验或验证失败
	DUP 		= 6;		// 重复登录被踢
	DISABLED 	= 7;		// 被禁止
}

// 客户端导航ID
enum GameNavbar {
	PLACEHOLDER 	= 0;		// 无效
	HOT_GAMES		= 1;		// 热门游戏
	CARD_GAMES		= 2;		// 棋牌游戏
	FISHING_GAMES 	= 3;		// 捕鱼游戏
	ELEC_GAMES		= 4;		// 电子游戏
	ONLINE_VIDEOS	= 5;		// 真人视讯
	SPORTS_GAMES	= 6;		// 体育赛事
	RECENTLY		= 7;		// 最近打开
}

enum VipBonus {
	VBNone 		= 0;
	Single 		= 1;			// 单次奖励，晋级之后及再次晋级之前可领
	Weekly 		= 2;			// 周奖励，周一及之后可领
	Monthly 	= 3;			// 月奖励，1 号及之后可领
	Alms		= 4;			// 救济金
	All			= 7;			// 同时领取所有(一键领取)
}

enum NoticeType {
	NTNone		= 0;
	Marquee		= 1;			// 跑马灯
	Announcement= 2;			// 公告
}

// 奖励领取状态
enum RewardStatus {
	NOTYET		= 0;			// 不可领取
	GOTTEN		= 1;			// 已领取
	INREADY 	= 2;			// 当前可领
}
