syntax = "proto3";

package pb;

//message header definition
//uint16 		| uint16 | int32  | int32   | int32   |  package_len - 16 |
//package_len   | msgid  | seq    | playerid | roomid | payload           |

//package_len : 一个消息包的长度
//msgid: 消息的id
//seq:  请求消息的编号（同一个tcp链接建立之后，消息id从0开始，每次发送一个请求编号+1）
//playerid: 玩家的uid
//roomid: 房间号的uid
//payload:  消息内容（protobuf打包序列化之后的二进制内容放到这里）


//消息id枚举定义

enum MSGID {
	MsgID_Min = 0;
	//server inner proto msgid
	MsgID_ConnClose_Notice = 10;

	//server inner proto end
	MsgID_Logon_Request = 10000;
	MsgID_Logon_Response = 10001;
	
	MsgID_CreateClub_Request = 30010;
	MsgID_CreateClub_Response = 30011;
	MsgID_ClubSnapshotList_Request = 30012;
	MsgID_ClubSnapshotList_Response = 30013;
	MsgID_ClubSnapshotList_Notice = 30014;

	MsgID_JoinClub_Request = 30015;//玩家申请加入俱乐部（clientnotadmin->world）
	MsgID_JoinClub_Notice_To_Member = 30016;//请求批准俱乐部（反馈）
	MsgID_JoinClub_Notice = 30017; //world--> 管理员或创建者
	MsgID_JoinClub_Reply = 30018; //管理员或创建者户端-->world 请求批准/拒绝
	MsgID_JoinClub_Response_To_Member = 30019;//请求批准俱乐部（反馈）
	MsgID_JoinClub_Response_To_Admin = 30020;//请求批准俱乐部（反馈给管理员）

	MsgID_LeaveClub_Request = 30021;
	MsgID_LeaveClub_Response = 30022;
	
	MsgID_ClubCurrentBoard_Request = 30023;
	MsgID_ClubCurrentBoard_Response = 30024;
	MsgID_ClubCurrentBoard_Notice = 30025;
	
	MsgID_ClubMemberSnapshotList_Request = 30026;
	MsgID_ClubMemberSnapshotList_Response = 30027;
	MsgID_ClubMemberSnapshotList_Notice = 30028;
	
	MsgID_ModifyClubMember_Request = 30029;
	MsgID_ModifyClubMember_Response = 30030;
	MsgID_ModifyClubMember_Notice = 30031;
	
	MsgID_ModifyClubInfo_Request = 30032;
	MsgID_ModifyClubInfo_Response = 30033;
	
	MsgID_GrantClubFund_Request = 30036;
	MsgID_GrantClubFund_Response = 30037;
	
	MsgID_SearchClubInfo_Request = 30038;
	MsgID_SearchClubInfo_Response = 30039;
	MsgID_SearchClubInfo_Notice = 30040;
	
	MsgID_ClubCreaterInfo_Request = 30041;
	MsgID_ClubCreaterInfo_Response = 30042;
	MsgID_ClubCreaterInfo_Notice = 30043;
	
	MsgID_SendMsg_Request = 30047;
	MsgID_SendMsg_Response = 30048;
	MsgID_SendMsg_Notice = 30049;
	
	MsgID_GetUserData_Request = 30050;
	MsgID_GetUserData_Response = 30051;
	MsgID_GetUserData_Notice = 30052;
	
	MsgID_HeartBeat_Request = 30053;
	MsgID_HeartBeat_Response = 30054;
	
	

	MsgID_GetJackpotData_Request = 30055;//请求彩池基础信息
	MsgID_GetJackpotData_Response = 30056;
	MsgID_GetJackpotData_Notice = 30057;
	
	MsgID_JackpotSetting_Request = 30058;//请求当前俱乐部彩池设置信息
	MsgID_JackpotSetting_Response = 30059;
	MsgID_JackpotSetting_Notice = 30060;
	
	MsgID_SetJackpot_Request = 30061;//请求设置彩池信息
	MsgID_SetJackpot_Response = 30062;
	MsgID_SetJackpot_Notice = 30063;
	
	MsgID_RecoverJackpotSetting_Request = 30064;//恢复默认设置
	MsgID_RecoverJackpotSetting_Response = 30065;
	
	MsgID_JackpotAmout_Notice = 30066;//广播推送奖池金额
	
	MsgID_CurrentRoomJackpot_Request = 30067;//请求当前俱乐部牌局盲注级别奖池信息
	MsgID_CurrentRoomJackpot_Response = 30068;
	MsgID_CurrentRoomJackpot_Notice = 30069;
	
	MsgID_JackpotAwardRecord_Request = 30070;//当前俱乐部奖池获奖历史记录
	MsgID_JackpotAwardRecord_Response = 30071;
	MsgID_JackpotAwardRecord_Notice = 30072;
	
	MsgID_JackpotInjectAmount_Request = 30073;//俱乐部管理员向jackpot注入金额
	MsgID_JackpotInjectAmount_Response = 30074;
	MsgID_JackpotInjectAmount_Notice = 30075;
	
	MsgID_JackPotAwardInfo_Notice = 30079; //推送击中牌形消息
	
	MsgID_CreateAlliance_Request = 30080;
	MsgID_CreateAlliance_Response = 30081;
	
	MsgID_LeaveAlliance_Request = 30082;
	MsgID_LeaveAlliance_Response = 30083;
	
	MsgID_SearchAlliance_Request = 30084;
	MsgID_SearchAlliance_Response = 30085;
	MsgID_SearchAlliance_Notice = 30086;
	
	MsgID_KickoffAllianceMember_Request = 30087;
	MsgID_KickoffAllianceMember_Response = 30088;
	MsgID_KickoffAllianceMember_Notice = 30089;
	
	MsgID_AllianceList_Request = 30090;
	MsgID_AllianceList_Response = 30091;
	MsgID_AllianceList_Notice = 30092;
	
	
	MsgID_JoinAlliance_Request = 30093;//俱乐部申请加入联盟（clientnotadmin->world）
	MsgID_JoinAlliance_Notice_To_Member = 30094;//请求批准俱乐部（反馈）
	MsgID_JoinAlliance_Notice_To_Admin = 30095; //--> 管理员或创建者
	MsgID_JoinAllianceReply_To_World = 30096; //管理员或创建者户端-->world 请求批准/拒绝
	MsgID_JoinAlliance_Response_To_Member = 30097;//请求批准俱乐部（反馈）
	MsgID_JoinAlliance_Response_To_Admin = 30098;//请求批准俱乐部（反馈给管理员）

	MsgID_AddRemarks_Request = 30099; //增加备注
	MsgID_AddRemarks_Response = 30100;
	MsgID_AddRemarks_Notice = 30101;

	MsgID_GetAllRemarks_Request = 30102; //获取备注
	MsgID_GetAllRemarks_Response = 30103;
	MsgID_GetAllRemarks_Notice = 30104;
	
	MsgID_LeaveAlliance_Notice  = 30105; //退出联盟通知盟主
	
	MsgID_ClearAllianceMaxBuyinLimit_Request = 30106; //清除联盟买入额度上限
	MsgID_ClearAllianceMaxBuyinLimit_Response = 30107;
	
	MsgID_SetAllianceMaxBuyinLimit_Request = 30108; //设置联盟买入额度上限
	MsgID_SetAllianceMaxBuyinLimit_Response = 30109;
	
	MsgID_SetAllianceControlBuyin_Request = 30110; //设置联盟买入额度控制
	MsgID_SetAllianceControlBuyin_Response = 30111;

	MsgID_FairPlay_Report_Request = 30112; //fairplay report
	MsgID_FairPlay_Report_Response = 30113;

	MsgID_DeviceInfo_Report_Request = 30120; //设备信息上报接口
	MsgID_DeviceInfo_Report_Response = 30121;

	MsgID_ClubGrantFund_Notice = 30122;		//通知俱乐部转账信息
	
	MsgID_GetIncome_Request = 30123;//请求收益信息
	MsgID_GetIncome_Response = 30124;
	MsgID_GetIncome_Notice = 30125;

	MsgID_GetUserClubGrantInfo_Request = 30126;	//请求玩家俱乐部转账信息
	MsgID_GetUserClubGrantInfo_Response = 30127;
	MsgID_GetUserClubGrantInfo_Notice = 30128;

	MsgID_NotifyUserGoldNum_Notice = 30129;		//通知客户端金币变化

	MsgID_GetUserMailListInfo_Request = 30130;	//客户端请求玩家邮件列表
	MsgID_GetUserMailListInfo_Response = 30131;
	MsgID_GetUserMailListInfo_Notice = 30132;

	MsgID_ReadAndFetchOneMail_Request = 30133;		//客户端阅读领取邮件
	MsgID_ReadAndFetchOneMail_Response = 30134;		
	MsgID_ReadAndFetchOneMail_Notice = 30135;
}

//消息体定义

//logon
message RequestLogon {
  string version = 1;
  string token = 2;
  string device_info = 3;
  string invitation_code = 4;
}

message ResponseLogon {
  int32 error = 1; // 0: success; 1:version not match; 2:uid not-exist; 3:token-failure 
}

// create club
message ClubParams{
	string club_name 					= 1;
	string club_area 					= 2;
	string club_icon 					= 3;
}

message RequestCreateClub{
	ClubParams param = 1;
}

message ResponseCreateClub{
	int32 error = 1; 
}

// ClubSnapshotList
message RequestClubSnapshotList{
	uint32 uid = 1;
}

message ResponseClubSnapshotList{
	int32 error = 1; 
}

message ClubSnapshotListParams{
	uint32 club_id 						= 1;
	string club_name 					= 2;
	string club_area 					= 3;
	string club_icon 					= 4;
	int32 club_member_max 				= 5;
	int32 club_member_count 			= 6;
	int32 club_type 					= 7;//是否私密：1 私密 0 公开 2 推荐
	int32 club_owner 					= 8;
	string club_descrption 				= 10;
	int32 club_create_time 				= 11;
	int32 club_level                    = 12; //俱乐部星级
	uint32 expire_time                  = 13; //到期时间
	int32 is_public_member              = 14; //是否为公共俱乐部成员 1：是 2：否
	repeated int32 opened_blindlevels   = 15; //俱乐部当前开启的盲注级别奖池
	int32 is_manager                    = 16; //是否为管理员
	string invitation_code 				= 17; //俱乐部邀请码
}

message NoticeClubSnapshotList{
	repeated ClubSnapshotListParams list = 1;
}

// Join club
message JoinClubParams{
	uint32 club_id = 1;
	uint32 club_uid = 2;
	string club_message = 3;
}

message RequestJoinClub{
	uint32 club_id = 1;
	uint32 club_uid = 2;
	string club_message = 3;
	string invitation_code = 4;
}

message NoticeJoinClub{
	uint32 club_id = 1;
	uint32 club_uid = 2;
	string club_message = 3;
	
	string applicant_name = 4; //申请者的名字
	string applicant_thumb = 5;
	string club_name = 6;
}

message ResponseJoinClubToMember{
	int32 error = 1;
}

message ResponseJoinClubToAdmin{
	int32 error = 1;
}

message NoticeJoinClubToMember{
	int32 result = 1; // 1：同意 2：拒绝
	uint32 club_id = 2;// 俱乐部id
	uint32 uid = 3;    // 被操作者id
	string reason = 4;// 理由
	string club_name = 5;
}

message ReplyJoinClub{
	int32 result = 1; // 1：同意 2：拒绝
	uint32 club_id = 2;// 俱乐部id
	uint32 uid = 3;    // 被操作者id
	string reason = 4;// 理由
}

message RequestLeaveClub{
	LeaveClubParams param = 1;
}

message ResponseLeaveClub{
	int32 error = 1;
}

//
message LeaveClubParams{
	uint32 club_id = 1;
	uint32 club_did = 2;
}

//
/*
message ClubCurrentBoardParams{
	uint32 club_id = 1;
	uint32 club_uid = 2;
}*/

message RequestClubCurrentBoard{
	//ClubCurrentBoardParams param = 1;
}

message ClubGameSnapshot{
	uint32 create_player_id = 1;
	string creator_name = 2;
	uint32 club_id = 3;
	int32 game_mode = 4; //区分普通牌局/比赛/其它游戏类型
	string room_name = 5; //区分普通牌局/比赛/其它游戏类型
	int32 player_count  = 6;   
	int64 small_blind  = 7;   
	int64 big_blind  = 8;  
	int64 buyin_min  = 9;   
	int64 buyin_max  = 10;  
	uint32 create_time = 11;
	bool  buyin_control = 12; 
	bool  insurance = 13; 
	bool  anti_cheating = 14; 
	bool  straddle = 15; 
	bool  rand_seat = 16; 
	int32 ante = 17;
	
	int32 player_count_max 	= 18; //牌桌最大人数
	int32 owner_type 	    = 19; //区分普通牌具/俱乐部牌局/定制俱乐部牌局
	
	string pic_path = 20; //图片路径
	string club_name = 21; //俱乐部名称
	int32 rule_time_limit = 22; //牌局时长对应8个时长类型
	uint32 room_id = 23; //房间id
	int32 game_status  = 24;     //1:牌局准备中 2:牌局进行中
	uint32 start_time = 25; //未开始=0；已点击开始=点击时间
	bool jackpot_isopen  = 26;     //1:已开启 2:未开启
	bool is_allin_allfold = 27; //是否是allin allfold
	uint32 extra_time = 28;
	bool is_opened_drawback             = 29; //是否打开撤码功能
	bool short_fullhouse_flush_straight_three = 30;
	bool is_force_showcard = 31;
}

message ResponseClubCurrentBoard{
	int32 error = 1;
}

message NoticeClubCurrentBoard{
	repeated ClubGameSnapshot list = 1;
}

//
message ClubMemberSnapshotListParams{
	uint32 club_id = 1;
	uint32 club_uid = 2;
}

message RequestClubMemberSnapshotList{
	ClubMemberSnapshotListParams param = 1;
}

message ResponseClubMemberSnapshotList{
	int32 error = 1;
}

message ClubMemberSnapshot{
	uint32 member_uid = 1;
	string member_icon = 2;
	string member_name = 3;
	int32 club_member_active = 4;
	int32 total_member_active = 5;
	int32 member_last_login_time = 6;
	int32 member_auth = 7;
	int64 user_gold = 9;
	bool is_online = 10;
}

message NoticeClubMemberSnapshotList{
	repeated ClubMemberSnapshot snapshots = 1;
}

//
message ModifyClubMemberParams{
	uint32 club_id = 1;
	uint32 club_uid = 2;
	uint32 target_id = 3;
	int32 action_type = 4;
}

message RequestModifyClubMember{
	ModifyClubMemberParams param = 1;
}

message ResponseModifyClubMember{
	int32 error = 1;
}

message NoticeModifyClubMember{
	int32 action_type = 1;
	uint32 club_id = 2;
	string club_name = 3;
	uint32 target_player_id = 4;
	string target_player_name = 5;
}

//
message ModifyClubInfoParams{
	uint32 club_id = 1;
	uint32 club_uid = 2;
	string club_name= 3;
	string club_descrption = 4;
	int32 action_type = 5;
}

message RequestModifyClubInfo{
	ModifyClubInfoParams param = 1;
}

message ResponseModifyClubInfo{
	int32 error = 1;
}

//
message GrantClubFundParams{
	uint32 club_id = 1;
	uint32 club_uid = 2;
	uint32 target_id = 3;
	int64 amount = 4;
}

message RequestGrantClubFund{
	GrantClubFundParams param = 1;
}

message ResponseGrantClubFund{
	int32 error = 1;
}

message RequestSearchClubInfo{
	uint32 club_id = 1;
}

message ResponseSearchClubInfo{
	int32 error = 1; 
}

message NoticeSearchClubInfo{
	ClubSnapshotListParams snapshots = 1;
}

message RequestClubCreaterInfo{
	uint32 club_id = 1;
}

message ResponseClubCreaterInfo{
	int32 error = 1; 
}

message NoticeClubCreaterInfo{
	string create_player_name   = 1; //俱乐部创建者的名字
	string create_player_thumb  = 2; //俱乐部创建者的头像
}

message NoticePurchaseClubLevel{
	uint32 expire_time = 1; 
}

message RequestSendMsg{
	uint32 club_id = 1;
	string msg = 2;
}

message ResponseSendMsg{
	int32 error = 1; 
}

message NoticeSendMsg{
	uint32 club_id = 1;
	uint32 user_id = 2;
	uint32 chat_time = 3;
	string player_name = 4;
	string player_icon = 5;
	string msg = 6;
}

//
message RequestGetUserData{
	uint32 user_id = 1;
}

message ResponseGetUserData{
	int32 error = 1; 
}

message NoticeGetUserData{
	string user_name = 1;
	string user_icon = 2;
	int64 gold_num = 3;
}

//GetJackpotData
message RequestGetJackpotData{
	uint32 club_id = 1;
}

message ResponseGetJackpotData{
	int32 error = 1; 
}

message Jackpot{
	int64 amount = 1; //奖池金额
	int32 blind_level = 2;//盲注级别
}

message NoticeGetJackpotData{
	uint32 club_id = 1;
	string club_name = 2;
	string club_avatar = 3;
	string club_area = 4;
	repeated Jackpot jackpots = 5;
}

//JackpotSetting
message RequestJackpotSetting{
	uint32 club_id = 1;
}

message ResponseJackpotSetting{
	int32 error = 1; 
}

message JackpotInfo{
	int64 amount = 1; //奖池金额
	int32 blind_level = 2;//盲注级别
	int64 profit_scale = 3;//盈利规模
	int64 drawin_amout = 4;//抽水数额
}

message AwardType{
	int32 hand_level = 1; //牌型
	int32 award_percent = 2;//奖励比例
}

message NoticeJackpotSetting{
	uint32 club_id = 1;
	repeated JackpotInfo jackpots = 2;
	repeated AwardType awardTypes = 3;
	int32 award2club_percent = 4;//奖励比例
}

//SetJackpot
message RequestSetJackpot{
	uint32 club_id = 1;
	repeated JackpotInfo jackpots = 2;
	repeated AwardType awardTypes = 3;
	int32 award2club_percent = 4;//奖励比例
}

message ResponseSetJackpot{
	int32 error = 1; 
}

//RecoverJackpotSetting
message RequestRecoverJackpotSetting{
	uint32 club_id = 1;
}

message ResponseRecoverJackpotSetting{
	int32 error = 1; 
}

//JackpotAmout
message NoticeJackpotAmout{
	uint32 club_id = 1;
	int32 blind_level = 2;//当前局盲注级别
	int64 prev_amount = 3;//上次奖池金额
	int64 current_amout = 4;//当前奖池金额
}

//CurrentRoomJackpot
message RequestCurrentRoomJackpot{
	uint32 club_id = 1;
	int32 blind_level = 2;
}

message ResponseCurrentRoomJackpot{
	int32 error = 1; 
}

message NoticeCurrentRoomJackpot{
	int64 profit_scale = 1;
	int64 drawin_amout= 2;
	repeated AwardType awardTypes = 3;
}

//JackpotAwardRecord
message RequestJackpotAwardRecord{
	uint32 club_id = 1;
	int32 blind_level = 2;
}

message ResponseJackpotAwardRecord{
	int32 error = 1; 
}

message AwardInfo{
	uint32 player_id = 1; //牌型
	int32 hand_level = 2;//牌型
	int64 award_amount = 3;//奖励金额
    uint32 award_time = 4;//奖励时间
	string player_name = 5; //玩家昵称
}

message NoticeJackpotAwardRecord{
	uint32 club_id = 1;
	AwardInfo luckDog = 2;
	repeated AwardInfo awardInfos = 3;
}

//JackpotInjectAmount
message RequestJackpotInjectAmount{
	uint32 club_id = 1;
	int32 blind_level = 2;
	int64 amount = 3;
}

message ResponseJackpotInjectAmount{
	int32 error = 1; 
}

message NoticeJackpotInjectAmount{
	uint32 club_id = 1;
	int32 blind_level = 2;
	int64 amount = 3;
}

message NoticeJackPotAwardInfo{
	uint32 award_playid = 1;
	int64 award_amount = 2;
	int32 hand_level = 3;
	string award_player_name = 4;
}

message RequestHeartBeat{
	uint32 uid = 1;
}

message ResponseHeartBeat{
	uint32 uid = 1;  
}

message RequestCreateAlliance{
	string alliance_name = 1;
	uint32 club_id = 2; 
}

message ResponseCreateAlliance{
	int32 error = 1; 
}

message RequestLeaveAlliance{
	uint32 alliance_id = 1;
	uint32 club_id = 2;
}

message ResponseLeaveAlliance{
	int32 error = 1;
}

message NoticeLeaveAlliance{
	uint32 alliance_id 					= 1;
	uint32 club_id         				= 2;
	uint32 club_admin_id					= 3;
	string alliance_name 				= 4;
	string club_name 				    = 5;
	
}

//请求联盟信息
message RequestSearchAllianceInfo{
	uint32 alliance_id = 1;
}

message ResponseSearchAllianceInfo{
	int32 error = 1; 
}

message ClubItemInfo{
	uint32 club_id 					= 1;
	int32 club_member_max 			= 2;
	int32 club_member_count 		= 3;
	string club_name 			    = 4;
	string creater_name 			= 5;
	string club_thumb 			= 6;
	uint32 creater_id 			= 7;
	
	int64 max_buyin_limit       = 8; //额度上限
	int64 cur_buyin_limit      = 9; //实时带入
	bool control_buyin          = 10; //带入控制
}

message NoticeSearchAlliance{
	uint32 alliance_id 					= 1;
	uint32 creater_club_id				= 2;
	int32 alliance_club_max 			= 3;
	int32 alliance_club_count 			= 4;
	string alliance_name 				= 5;
	repeated ClubItemInfo clubItems     = 6;//俱乐部信息
}

//剔除联盟成员
message RequestKickoffAllianceMember{
	uint32 alliance_id = 1;
	uint32 club_id = 2;
	uint32 target_id = 3;
}

message ResponseKickoffAllianceMember{
	int32 error = 1;
}

message NoticeKickoffAllianceMember{
	uint32 alliance_id = 1;
	uint32 target_club_id = 2;
	string alliance_name = 3;
	string target_club_name = 4;
}


//AllianceSnapshotList
message RequestAllianceList{
	uint32 club_id = 1;
}

message ResponseAllianceList{
	int32 error = 1; 
}

message AllianceListParams{
	uint32 alliance_id 			= 1;
	string alliance_name 		= 2;
	int32 club_max 				= 3;
	int32 club_count 			= 4;
	bool is_creater             = 5; //是否为盟主
	int32 reviewed 			    = 6;
}

message NoticeAllianceList{
	repeated AllianceListParams list = 1;
}

// Join alliance
message RequestJoinAlliance{
	uint32 alliance_id = 1;
	uint32 club_id = 2;
	string message = 3;
}

message NoticeJoinAlliance{
	uint32 alliance_id = 1;
	uint32 club_id = 2;
	string message = 3;
	string club_name = 4; //申请者的名字
	string alliance_name = 5;
}

message ResponseJoinAllianceToMember{
	int32 error = 1;
}

message ResponseJoinAllianceToAdmin{
	int32 error = 1;
}

message NoticeJoinAllianceToMember{
	int32 result = 1;     // 1：同意 2：拒绝
	uint32 alliance_id = 2;// 俱乐部id
	uint32 club_id = 3;    // 被操作者id
	string reason = 4;    // 理由
	string alliance_name = 5;
	uint32 club_admin_id = 6;     // 申请者俱乐部管理员id
}

message ReplyJoinAllianceToWorld{
	int32 result = 1;      // 1：同意 2：拒绝
	uint32 alliance_id = 2; // 俱乐部id
	uint32 club_id = 3;     // 被操作者id
	string reason = 4;     // 理由
}
message RequestAddRemarks{
	uint32 target_id = 1;
	int32 remark_type = 2;
	string taget_remark = 3;
}

message ResponseAddRemarks{
	int32 error = 1; 
}

message NoticeAddRemarks{
	uint32 target_id = 1;
	int32 remark_type = 2;
	string taget_remark = 3;
}

message RequestGetAllRemarks{
	uint32 playerid = 1;
}

message ResponseGetAllRemarks{
	int32 error = 1; 
}

message NoticeGetAllRemarks{
	string remarks_data = 1;
}

message RequestClearAllianceMaxBuyinLimit{
	uint32 alliance_id = 1; // 俱乐部id
	uint32 club_id = 2;     // 被操作者id
}

message ResponseClearAllianceMaxBuyinLimit{
	int32 error = 1; 
}

message RequestSetAllianceMaxBuyinLimit{
	uint32 alliance_id = 1; // 俱乐部id
	uint32 club_id = 2;     // 被操作者id
	int64 amount = 3;
}

message ResponseSetAllianceMaxBuyinLimit{
	int32 error = 1; 
}

message RequestSetAllianceControlBuyin{
	uint32 alliance_id = 1; // 俱乐部id
	uint32 club_id = 2;     // 被操作者id
	bool control_buyin = 3; //带入控制
}

message ResponseSetAllianceControlBuyin{
	int32 error = 1; 
}

message RequestFairPlayReport{
	uint32 roomid = 1;
	uint32  clubid = 2;
	uint64 room_uuid = 3;
	uint64 game_uuid = 4;
	repeated uint32 suspect_uids = 5; //怀疑对象uid列表
	string contact = 6; //反馈联系方式（如果有）
	string detail = 7; //描述细节（如果有）
}

message ResponseFairPlayReport{
	int32 error = 1; 
}

message RequestDeviceInfoReport{
    uint32 report_channel = 1; //1:注册上报；2：充值上报 (3:登录上报 已经有了不用上传)
	string device_info = 2; 
}

message ResponseDeviceInfoReport{
	int32 error = 1; 
}

message ClubGrantFundNotice{
	int32	error = 1;
	uint32	op_playerId = 2;		//转账的人的id
	uint32	clubid = 3;				//俱乐部id
	uint32	targetid = 4;			//目标的id
	int64	amount = 5;				//转账金额	
}

//GetIncome
message RequestGetIncome{
	uint32 uid = 1;
}

message ResponseGetIncome{
	int32 error = 1; 
}

message NoticeGetIncome{
	int64 club_fee = 1;
	int64 club_insurance = 2;
	int64 club_jackpot = 3;
	int64 alli_fee = 4;
	int64 alli_insurance = 5;
	int64 alli_jackpot = 6;
}

message TransferToOtherInfo{
	uint32	operator_id = 1;
	uint32	club_id = 2;
	uint32	targer_id = 3;
	int64	amount = 4;
	int32	grant_time = 5;	//转账时间
	string	operator_name = 6;
	string	target_name = 7;
}

message RequestGetUserClubGrantInfo{
	uint32 uid = 1;
}

message ResponseGetUserClubGrantInfo{
	int32 error = 1;
}

message NoticeGetUserClubGrantInfo{
	repeated TransferToOtherInfo to_list = 1;	//转给别人的钱的信息
	repeated TransferToOtherInfo get_list = 2;	//别人转过来的钱的信息
}

message NoticeNotifyUserGoldNum{
	uint32	uid = 1;
	int64	changeNum = 2;	//金币变化值
	int64	goldNum = 3;	//变化后金币值
}

message AttachemmentInfo{
	uint32	item_id = 1;		//物品ID
	uint32	item_num = 2;		//物品数量
}


message MailInfo{
        uint32  mail_id = 1;            //邮件ID
        uint32  mail_type = 2;          //邮件类型 0个人 1系统 2通知
        uint32  mail_state = 3;         //邮件状态  是否已读
        string  mail_title = 4;         //邮件标题
        uint32  mail_sender_id = 5;     //发送者uid
        string  mail_appellation = 6;   //邮件抬头
        string  mail_content = 7;       //邮件内容
        string  mail_inscribe = 8;      //邮件签名
        uint32  mail_sendtime = 9;      //邮件发送时间
        uint32  mail_expiredtime = 10;  //失效时间  从发送时间开始计算
	uint32	isexpired = 11;		//是否过期 0否1是
        repeated AttachemmentInfo attachment_list = 12;         //附件列表              
}

message RequestGetUserMailList{
	uint32	uid = 1;	
	uint32	mail_begin_index = 2;	//邮件开始索引  从0开始
	uint32	mail_end_index = 3;	//请求结束索引
}

message ResponseGetUserMailList{
	uint32 error = 1;	//错误码
}

message NoticeGetUserMailList{
	repeated MailInfo mail_list = 1; //邮件信息列表
}

message RequestFetchOneMail{
	uint32	uid = 1;	
	uint32	mail_id = 2;	
}

message ResponseFetchOneMail{
	uint32 error = 1;
}

message NoticeFetchOneMail{ 
	MailInfo onemail = 1;
}

message NoticeNewMail{
	MailInfo onemail = 1; //新邮件通知
}

message NoticeExpiredMail{
	uint32 uid = 1; //邮件过期提醒
	uint32 mail_id = 2;
}

message NoticeDeleteMail{
	uint32 uid = 1; //删除客户端一封邮件
	uint32 mail_id = 2;
}

message RequestAttFetchedMail{
	uint32 uid = 1; //附件已被领取
	uint32 mail_id = 2;
}

message ResponseAttFetcedMail{
	uint32 error = 1;	
}












