package com.backfire.protoMethod; 

option java_package = "com.backfire.protoMethod"; 
option java_outer_classname = "buff_http"; 

//是否需要升级请求 UpgradeRequest = "101"
message UpgradeRequest
{
	required	uint32	appId		= 1;			//渠道号
	required 	string	ver			= 2;			//版本号
}
//升级请求返回 UpgradeReply
message UpgradeReply
{
	required	uint32	ret			= 1;			//是否需要升级1：需要升级 2不需要升级 3强制升级
	optional	uint32	retCode		= 2;			// 1：错误码
	optional	string	retMsg		= 3;			// 升级提示语
	optional 	string	downUrl		= 4;			//下载地址
}
//登陆请求 LoginRequest ="102"
message	LoginRequest
{
	required	uint32	appId		 = 1;			//渠道号
	required 	string	ver		     = 2;			//版本号
	optional 	string	genSn		 = 3;			//唯一识别ID
	optional	string	phoneSn		 = 4;			//IMEI
	optional 	string	open_id		 = 5;			//第三方唯一识别ID
	optional	string	token		 = 6;			//第三方访问token
	optional    string  android_id   = 7;
    optional    string  mac_id       = 8;
    optional    string  bluetooth_id = 9;	
	optional	string	someStr4	 = 10;
}
//用户信息返回 LoginReply
message	LoginReply
{
	required	uint32	ret			= 1;			//是否登陆成功 1：成功 2 失败
	optional	uint32	retCode		= 2;			// 失败原因
	optional	string	retMsg		= 3;			// 失败原因提示语
	optional	uint64	uid			= 4;			//用户唯一识别ID
	optional	string	session		= 5;			//用户session
	optional	string	uname		= 6;			//用户绑定邮箱
	optional	string	nick		= 7;			//用户呢称
	optional	uint32	sex			= 8;			//用户性别
	optional	string	address		= 9;			//用户地址
	optional	string	icon		= 10;			//用户图像地址
	optional	Experience exp		= 11;	
	optional	Money	money		= 12;			
	optional	Tip	tip				= 13;	
	optional	Other	other		= 14;			//用户其他信息
	
}
Message Experience
{
	optional	uint32	level		= 1;			//用户等级
	optional	uint32	exp		= 2;				//用户经验
	optional	uint64	winCount	= 3;			//用户胜场
	optional	string	title		= 4;			//用户称谓
}
message Money
{
	optional	uint64	money		= 1;			//用户筹码
	optional	uint64	gold		= 2;			//用户元宝
	optional	uint32	vip		= 3;				//VIP等级
	optional	uint64	viptime		= 4;			//VIP剩余天数
}
message Tip
{
	optional	uint32	tipFree		= 1;			//提示功能是否免费使用
	optional	uint32	tipCount	= 2;			//提示功能可使用次数
}

message Other
{
	optional	string	signature	= 2;			//用户签名
	//repeated	Gift	gifts		= 4;			//持有礼物     另起接口
} 
message Gift
{
	optional	uint32	id			= 1;			//礼物ID
	optional	string	name		= 2;			//礼物名称
	optional	string	icon		= 3;			//礼物图片地址
	optional	uint32	count		= 4;			//礼物数量
} 
//请求获取一些辅助信息，比如登陆奖励、在线人数等 AssistMessageRequest =  "103"
message AssistMessageRequest
{
	required	uint64	uid			= 1;			//用户唯一识别ID
	required	string	session		= 2;			//用户session
}
 
message PayTip
{
	optional	uint32	id			=1;
	optional	string  content		=2;
}
 
//辅助信息返回，比如登陆奖励、在线人数等 AssistMessageReply
message AssistMessageReply
{
	required	uint32	ret				= 1;			//是否返回辅助信息成功 1：成功 2 失败
	optional	uint32	retCode			= 2;			// 失败原因
	optional	string	retMsg			= 3;			// 失败原因提示语	
	repeated	NotifyMsg notifyMsg	= 4;	
	optional    string  exerMsg 		= 5;            //活动内容
	optional 	uint64	OnlineNum		= 6;			//在线人数
	repeated	Award	awards			= 7;			//连续登陆XX天，奖励XX金币
	optional	uint32	loginTimes		= 8;			//已经连续登陆天数
	optional	uint32	isLogin			= 9;			//今天是否已经领取了登陆奖励
	optional    string  tipMsg          = 10;           //房间内点击提示显示信息
	repeated	PayTip	paytips			= 11;			//支付提示语	
	optional	string 	sendtips		= 12;			//支付发货提醒
}

message NotifyMsg
{
	required	String	title	= 1;	
	required	String	desc	= 2;		
}

message Award
{
	required	Money	awardMoney	= 1;	//连续登陆奖励的金币
	required	Tip		awardTip	= 2;		//连续登陆奖励的提示
}
//获取登陆奖励 LoginAwardRequest =  "104"
message LoginAwardRequest
{
	required	uint64	uid		= 1;			//用户唯一识别ID
	required	string	session		= 2;			//用户session
} 
//获取登陆奖励返回，LoginAwardReply
message LoginAwardReply
{
	required	uint32	ret		= 1;			//是否领取登陆奖励成功 1：成功 2 失败
	optional	uint32	retCode		= 2;			// 失败原因
	optional	string	retMsg		= 3;			// 失败原因提示语、
	optional	Money	money		= 4;			//筹码
	optional	Tip	tip		= 5;			//提示
	optional	string	succMsg		= 6;			//领取登陆奖励成功提示语
}
//用户修改信息，包括昵称、性别、地址、图像，以及绑定邮箱 ModifyUserRequest = "105,106,107" 105代表绑定邮箱，106代表修改昵称等，107修改用户头像
message ModifyUserRequest
{
	required	uint64	uid		= 1;			//用户唯一识别ID
	required	string	session		= 2;			//用户session
	optional	string	uname		= 3;			//用户绑定邮箱
	optional	string	password	= 4;			//绑定邮箱时需要输入密码
	optional	string	nick		= 5;			//用户呢称
	optional	uint32	sex		= 6;			//用户性别
	optional	string	address		= 7;			//用户地址
	optional	string	signature	= 8;			//用户签名
	optional	string	icon		= 9;			//用户图像地址

}
//用户修改信息返回 ModifyUserReply
message ModifyUserReply
{
	required	uint32	ret		= 1;			//是否修改成功 1：成功 2 失败
	optional	uint32	retCode		= 2;			// 失败原因
	optional	string	retMsg		= 3;			// 失败原因提示语
}
//用户通过绑定的邮箱恢复账号系统， RecoverUserRequest = "108" 返回直接使用 LoginReply
message RecoverUserRequest
{
	required	uint64	uid		= 1;			//用户唯一识别ID
	required	string	session		= 2;			//用户session
	optional	string	uname		= 3;			//用户绑定邮箱
	optional	string	password	= 4;			//绑定邮箱时需要输入密码
}

//返回大厅刷新数据请求 BackToHall= "109"
message     BackToHallReq
{
     required     uint64     uid          = 1;               //用户唯一识别ID
     required     string     session          = 2;               //用户session
}



//获取进入房间 TableReq = "301"
message	TableReq
{
	required	uint64	uid		= 1;			//用户唯一识别ID
	required	string	session		= 2;			//用户session
	optional	uint32	type		= 3;			//1:快速进入，2：初级场 3中级场 4高级场    以后场时动态配置，故这个接口得调整
	optional	uint32	form		= 4; 			//分组编号
}
//进入房间请求返回 TableRpy
message	TableRpy
{
	required	uint32	ret		= 1;				//是否获取桌子成功 1：成功 2 失败
	optional	uint32	retCode		= 2;			// 失败原因
	optional	string	retMsg		= 3;			// 失败原因提示语
	optional	string	ip		= 4;				//服务器对应IP
	optional	uint32	port		= 5;			//服务器对应端口号
	optional	uint32	tid		= 6;				//桌子ID
	optional	string	voip		= 7;			//语音服务器对应IP
	optional	uint32	voport		= 8;			//语音服务器对应端口号
}

//桌子列表请求 CourtListRequest = "302"
message CourtListRequest
{
	required	uint64	uid			= 1;			//用户唯一识别ID
	required	string	session		= 2;			//用户session
	required	string	courtId		= 3;			//赛场ID，如普通场为1，比赛场为2，换牌场为3，新玩法场为4
} 

//桌子列表请求返回 CourtListReply
message CourtListReply
{
	required	uint32	ret				= 1;			//1：成功 2 失败
	optional	uint32	retCode			= 2;			//错误码
	optional	string	retMsg			= 3;			//提示语
	repeated	Court	courtBean		= 4;			//桌子对象
}

message Court
{
	optional	string	name		= 1;			//桌名
	optional	uint64	min_enter	= 2;			//准入
	optional	uint64	min_chip	= 3;			//底注
	optional	string	form		= 4;			//分组编号
	optional	string	desc		= 5;			//详细介绍
	optional	uint32	type		= 6;			//桌类型，用于tableReq
	optional	uint32	left_icon	= 7;			//左角标类型
	optional	uint32 	right_icon 	= 8;			//右角标类型
} 

//获取进入房间 QuickStartReq= "303"
message QuickStartReq
{
      required       uint64       uid             = 1;      //用户唯一识别ID
      required       string       session       = 2;      //用户session
      optional       uint32       form            = 3;      //1：普通场 2比赛场 3换牌场    以后场时动态配置，故这个接口得调整
}
//进入房间请求返回QucikStartRpy
message QuickStartRpy
{
      required       uint32       ret             = 1;      //是否获取桌子成功 1：成功 2 失败
      optional       uint32       retCode       = 2;      // 失败原因
      optional       string       retMsg         = 3;      // 失败原因提示语
      optional       string       ip                = 4;      //服务器对应IP
      optional       uint32       port            = 5;      //服务器对应端口号
      optional       uint32       tid              = 6;      //桌子ID
      optional       string       voip             = 7;       //语音服务器对应IP
      optional       uint32       voport         = 8;       //语音服务器对应端口号
	  optional       uint64       needMoney       = 9;      //所需钱数，ret为2时解析此值
}

//赛场详情请求 MatchInfoReq= "304"
message MatchInfoReq
{
      required       uint64       uid           = 1;      	//用户唯一识别ID
      required       string       session       = 2;      	//用户session
      optional       uint32       form          = 3;      	//1：普通场 2比赛场 3换牌场    以后场时动态配置，故这个接口得调整
      optional       uint32       type          = 4; 		//桌类型，用于tableReq
}
//赛场详情请求返回 MatchInfoRpy
message MatchInfoRpy
{
      required       uint32       ret           = 1;      //是否获取桌子成功 1：成功 2 失败
      optional       uint32       retCode       = 2;      // 失败原因
      optional       string       retMsg        = 3;      // 失败原因提示语	 
      optional       string       title         = 4;      //标题
	  optional       string       desc          = 5;      //详情
	  optional       string       beginTime     = 6;      //开赛时间
	  optional       uint32       count         = 7;      //参赛人数
	  optional       string       condition     = 8;      //进入条件
}

//获取房间提示信息 TableMsgReq= "305"
message TableMsgReq
{
      required       uint64       uid             = 1;      //用户唯一识别ID
      required       string       session       = 2;      //用户session
      optional       uint32       form           = 3;      //1：普通场 2比赛场 3换牌场    以后场时动态配置，故这个接口得调整
      optional       uint32       type           = 4;       //桌类型，用于tableReq
}
//获取房间提示信息 TableMsgRpy
message TableMsgRpy
{
      required       uint32       ret              = 1;      //是否获取桌子成功 1：成功 2 失败
      optional       uint32       retCode        = 2;      // 失败原因
      optional       string       retMsg          = 3;      // 失败原因提示语  
      optional       string       msg              = 4;      //房间提示信息显示
}


//请求获取商品列表 ListProductReq =  "401"
message ListProductReq
{
	required	uint64	uid		= 1;			//用户唯一识别ID
	required	string	session		= 2;			//用户session
	required    uint32  type          = 3;               //商品类型
}

message Product
{
	required	uint32	productID	= 1;
	required	string	productName	= 2;
	required	uint32	price		= 3;
	required	string	desc		= 4;
	optional	string	imageUrl	= 5;
	optional	string	paycode		= 6;			//现在做计费点使用	
}
//商品列表返回 ListProductRpy = "shop.PdtRpy"
message ListProductRpy
{
	required	uint32	ret		= 1;			//是否获取商品列表成功 1：成功 2 失败
	optional	uint32	retCode		= 2;			// 失败原因
	optional	string	retMsg		= 3;			// 失败原因提示语
	repeated	Product	products	= 4;
}


//获取充值所需的商品信息 RechargeGoodsReq = "402"，
message RechargeGoodsReq
{
	required	uint64	uid		= 1;
	required	string	session		= 2;
	required	uint32  type		= 3;	//商品类型，1代表金币，2代表“提示”，3代表“元宝”
	required	uint64	needMoney	= 4;
}

//充值所需的商品信息返回 CollapseTimesRpy
message RechargeGoodsRpy
{
	required	uint32	ret		= 1;
	optional	uint32  retCode		= 2;
	optional	string	retMsg		= 3;	
	optional	Product	products	= 4;
}

//购买提示所需的商品信息 CheckBuyMessageReq = "403"
message CheckBuyMessageReq
{
       required     uint64     uid                = 1;               //用户唯一识别ID
       required     string     session          = 2;               //用户session
       optional     uint64     orderid            = 3;               //订单ID
}

message     CheckBuyMessageRpy
{
     required     uint32     ret                 = 1;               //订单是否已经成功 1：成功 2 失败
     optional     uint32     retCode          = 2;               // 失败原因
     optional     string     retMsg            = 3;               // 失败原因提示语
     optional     Money     moneyBean           = 4              
     optional     Tip     tipBean                      = 5;              
}

//直接购买商品请求 DirectBuyReq = "404"，
message DirectBuyReq
{
     required     uint64     uid          = 1;
     required     string     session          = 2;
     required     uint32  type          = 3;     //商品类型，1代表金币，2代表“提示”，3代表“元宝”
}

//充值所需的商品信息返回DirectBuyRpy
message DirectBuyRpy
{
     required     uint32     ret          = 1;
     optional     uint32  retCode          = 2;
     optional     string     retMsg          = 3;    
     optional     Product     products     = 4;
}

//验证订单失败数据提交，ConfirmOrderFailedRequest= "405" 返回直接使用RpyConfirmOrderFailed
message ConfirmOrderFailedRequest
{
       required     uint64     uid                = 1;               //用户唯一识别ID
       required     string     session          = 2;               //用户session
       optional     uint64     orderid            = 3;               //订单ID
}

message     ConfirmOrderFailedRpy
{
     required     uint32     ret                 = 1;               //订单是否已经成功 1：成功 2 失败
     optional     uint32     retCode          = 2;               // 失败原因
     optional     string     retMsg            = 3;               // 失败原因提示语    
}



//请求比赛排行列表 ListRankReq =  "501,502" 501代表今日排行，502代表上期获奖排行
message ListRankReq
{
	required	uint64	uid			= 1;			//用户唯一识别ID
	required	string	session		= 2;			//用户session
	optional    uint32  form        = 3;      		//1：普通场 2比赛场 3换牌场    以后场时动态配置，故这个接口得调整
    optional    uint32  type        = 4;    		//桌类型,不传默认为5
}

//排行列表返回 ListRankRpy = "rank.matchRpy"
message ListRankRpy
{
	required	uint32	ret		= 1;			//是否获取商品列表成功 1：成功 2 失败
	optional	uint32	retCode		= 2;			// 失败原因
	optional	string	retMsg		= 3;			// 失败原因提示语
	repeated	Rank	ranks		= 4;
}
message Rank
{
	optional	uint64	uid		= 1;			//uid
	optional	uint32	position	= 2;			//排行
	optional	string	unick		= 3;			//昵称
	optional	uint64	money		= 4;			//赢的筹码
	optional	string	dateTime	= 5;			//时间
}

//财富榜 "503" 
message WealthRankReq
{
	required	uint64	uid		= 1;			//用户唯一识别ID
	required	string	session		= 2;			//用户session
}
message WealthRankRpy
{
	required	uint32	ret			= 1;			// 1：成功 2 失败
	optional	uint32	retCode		= 2;			// 失败原因
	optional	string	retMsg		= 3;			// 失败原因提示语
	repeated	WealthRank	wealthRanks		= 4;
}
message WealthRank
{
	optional	uint64	uid		= 1;				//uid
	optional	uint32	position	= 2;			//排行
	optional	string	unick		= 3;			//昵称
	optional	uint64	money		= 4;			//赢的筹码
	optional	String	icon		= 5;			//图标
}

//充值榜 "504" 
message RechargeRankReq
{
	required	uint64	uid		= 1;			//用户唯一识别ID
	required	string	session		= 2;			//用户session
}
message RechargeRankRpy
{
	required	uint32	ret			= 1;			// 1：成功 2 失败
	optional	uint32	retCode		= 2;			// 失败原因
	optional	string	retMsg		= 3;			// 失败原因提示语
	repeated	RechargeRank	RechargeRanks		= 4;
}
message RechargeRank
{
	optional	uint64	uid		= 1;				//uid
	optional	uint32	position	= 2;			//排行
	optional	string	unick		= 3;			//昵称
	optional	uint64	money		= 4;			//赢的筹码
	optional	String	icon		= 5;			//图标
}





//获取活动列表 ExerciseListReq = "601"
message ExerciseListReq
{
	required	uint32	uid		= 1;
	required	string	session		= 2;
}

message Exercise
{
	required	string	title		= 1;
	required	string	desc		= 2;
}
//获取活动列表返回 ExerciseListRpy = "exer.ExerRpy"
message ExerciseListRpy
{
	required	uint32	ret		= 1;
	optional	uint32	retCode		= 2;
	optional	string	retMsg		= 3;
	repeated	Exercise exercises	= 4;
}

//获取系统信息列表 使用接口SystemInFoReq = "602" 接口数据类型跟ExerciseListReq一样，返回数据类型跟ExerciseListRpy一样，系统信息类型跟Exercise一样

//获取个人信息列表 使用接口PersonInFoReq = "603" 接口数据类型跟ExerciseListReq一样，返回数据类型跟ExerciseListRpy一样，系统信息类型为PersonInFo
message PersonInFo
{
	required	uint32	infoID		= 1;		//个人信息对应ID
	required	string	desc		= 3;		//个人信息描述
	required	uint32	canReceive	= 4;		//是否能够被领取，1:能,其他则不能
}

message PersonListRpy
{
	required	uint32	ret		= 1;
	optional	uint32	retCode		= 2;
	optional	string	retMsg		= 3;
	repeated	PersonInFo info		= 4;
}

//请求获取活动奖励 PersonDeliverReq = "604"
message PersonDeliverReq
{
	required	uint32	uid		= 1;
	required	string	session		= 2;
	optional	uint32	infoID		= 3;
}
//获取活动奖励返回 PersonDeliverRpy
message PersonDeliverRpy
{
	required	uint32	ret		= 1;
	required	uint32	retCode		= 2;
	optional	string	retMsg		= 3;	
	optional	Money	money		= 4;
	optional	Tip	tip		= 5;
	optional	string	succMsg		= 6;	//提示信息
}




//提交反馈信息 SubmitFeedBackReq = "701"
message SubmitFeedBackReq
{
	required	uint32	uid		= 1;
	required	string	session		= 2;	
	optional	string	feedBackMsg	= 3;	//反馈信息
	optional	string  connectPhone	= 4;	//联系电话
}
//提交反馈信息返回 SubmitFeedBackRpy
message SubmitFeedBackRpy
{
	required	uint32	ret		= 1;
	required	uint32	retCode		= 2;
	optional	string	retMsg		= 3;	
}

//帮助-游戏规则 GameRuleReq= "702"
message GameRuleReq
{
     required     uint32     uid          = 1;
     required     string     session          = 2;    
}
//帮助-游戏规则返回 
message GameRuleRpy
{
     required     uint32     ret                = 1;
     required     uint32     retCode         = 2;
     optional     string     retMsg           = 3;    
     optional     string     gamerule          = 4;        //游戏规则
}

//帮助-常见问题 CommonReq= "703"
message CommonReq
{
     required     uint32     uid          = 1;
     required     string     session          = 2;    
}
//帮助-常见问题 CommoneRpy
message CommoneRpy
{
     required     uint32     ret                = 1;
     required     uint32     retCode         = 2;
     optional     string     retMsg           = 3;    
     optional     string     commonedesc          = 4;        //常见问题描述
}




//获取破产奖励次数 CollapseTimesReq = "801"
message CollapseTimesReq
{
	required	uint64	uid		= 1;
	required	string	session		= 2;
}

//破产奖励次数返回 CollapseTimesRpy
message CollapseTimesRpy
{
	required	uint32	ret		= 1;
	optional	uint32  retCode		= 2;
	optional	string	retMsg		= 3;	
	optional	uint32  times           = 4;
}

//提交减少提示次数  ReduceTipCountReq = "802"
message ReduceTipCountReq
{
	required	uint64	uid		= 1;
	required	string	session		= 2;
	required	uint32	type		= 3;			//场类型
}
//提交减少提示次数返回 ReduceTipCountRpy
message ReduceTipCountRpy
{
	required	uint32	ret		= 1;
	required	uint32	retCode		= 2;
	optional	string	retMsg		= 3;	
	optional	Tip	tip		= 4;			//提示
}



//请求获取任务列表 ListTaskReq =  "901"
message ListProductReq
{
     required     uint64     uid          = 1;               //用户唯一识别ID
     required     string     session          = 2;          //用户session
     optional      uint32     type          = 3;              //任务类型：0或没有代表每日任务，1代表系统任务
}

message Task
{
     required     uint32     taskID                   = 1;                    //任务ID
     required     string     taskName              = 2;                //任务名称
     optional      string     taskDesc                = 3;                  //任务奖励描述
      optional     uint32     compelteRate        = 4;                 //任务已经完成进度
     optional      uint32     totalRate                  = 5;                 //任务总进度
      optional     uint32     canAliPay               = 6;               //任务状态：1不能领取   2：可以领取     3：已经领取奖励（已完成）
}
//任务列表返回 ListTaskRpy
message  ListTaskRpy
{
     required     uint32     ret          = 1;               //是否获取任务列表成功 1：成功 2 失败
     optional     uint32     retCode          = 2;               // 失败原因
     optional     string     retMsg          = 3;               // 失败原因提示语
     repeated    Task     tasks    = 4;
	 optional     string     tipMsg          = 5;               // 提示语
}

//领取任务 AliPayTaskReq =  "902"
message  AliPayTaskReq 
{
     required     uint64     uid          = 1;               //用户唯一识别ID
     required     string     session      = 2;              //用户session
     optional      uint32     type          = 3;              //任务类型：0或没有代表每日任务，1代表系统任务
     optional      uint32     taskID        = 4;              //任务ID
}

//领取任务返回AliPayTaskRpy
message  AliPayTaskRpy
{
     required     uint32     ret              = 1;                   //是否获取任务列表成功 1：成功 2 失败
     optional     uint32     retCode        = 2;               // 失败原因
     optional     string     retMsg          = 3;               // 失败原因提示语
     optional     uint64     money         = 4;               //任务奖励money
     optional     uint32     tip               = 5;               //任务奖励提示
     optional     uint64     totalMoney   = 6;               //用户总money
     optional     uint32     totalTip        = 7;               //用户总提示
}

//获取可领取任务的数量 AliPayTaskNumReq =  "903"
message  AliPayTaskNumReq 
{
     required     uint64     uid          = 1;               //用户唯一识别ID
     required     string     session      = 2;              //用户session
     optional      uint32     type          = 3;              //任务类型：0或没有代表每日任务，1代表系统任务
}

//领取任务返回AliPayTaskNumRpy
message  AliPayTaskNumRpy
{
     required     uint32     ret              = 1;                   //是否获取任务列表成功 1：成功 2 失败
     optional     uint32     retCode        = 2;               // 失败原因
     optional     string     retMsg          = 3;               // 失败原因提示语
     optional     uint32     number        = 4;               //可领取的任务的数量

}
