import "client2world_msg_type.proto";
import "msg_type_def.proto";
import "msg_info_def.proto";

package client2world_protocols;

// 请求兑换
message packetc2w_exchange
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2w_exchange]; 

	// 兑换ID
	optional int32 exchangeId = 2;

	// 电话号码
	optional string phone = 3;
}
 
// 请求兑换结果
message packetw2c_exchange_result
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_w2c_exchange_result]; 

	optional int32 exchangeId = 2;
	
	optional int32 result = 3;
}

// 取得兑换状态
message packetc2w_get_exchange_state
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2w_get_exchange_state]; 
}

// 兑换信息
message ExchangeInfo
{
	// 时间
	optional int32 time = 1;

	// 兑换ID
	optional int32 chgId = 2;

	// 状态
	optional int32 state = 3;
}

// 取得兑换状态结果
message packetw2c_get_exchange_state_result
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_w2c_get_exchange_state_result]; 

	repeated ExchangeInfo infoList = 2;
}

// 请求已兑换数量
message packetc2w_req_exchange_count
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2w_req_exchange_count]; 
}

message ExchangeCountInfo
{
	// 兑换ID
	optional int32 chgId = 1;

	// 数量
	optional int32 hasExchangeCount = 2;
}

// 请求已兑换数量结果
message packetw2c_req_exchange_count_result
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_w2c_req_exchange_count_result]; 
	//全服兑换次数
	repeated ExchangeCountInfo G_InfoList = 2;
	//个人兑换次数
	repeated ExchangeCountInfo P_InfoList = 3;
}

// 请求强更新补偿
// message packetc2w_req_foreceupdate_reward
// {
// 	optional e_server_msg_type packet_id = 1 [default = e_mst_c2w_req_foreceupdate_reward]; 
// }

// // 请求强更新补偿结果
// message packetw2c_req_foreceupdate_reward_result
// {
// 	optional e_server_msg_type packet_id = 1 [default = e_mst_w2c_req_foreceupdate_reward_result]; 
// }

// message packetc2w_exchange_db_dbchip 
// {
// 	optional e_server_msg_type packet_id = 1 [default = e_mst_c2w_exchange_db_dbchip ];

// 	// 1龙珠->龙珠碎片   2龙珠碎片->龙珠
// 	optional int32 op = 2;

// 	optional int32 count = 3;
// }   

// message packetw2c_exchange_db_dbchip_result
// {
// 	optional e_server_msg_type packet_id = 1 [default = e_mst_w2c_exchange_db_dbchip_result];

// 	optional int32 op = 2;

// 	optional int32 result = 3;

// 	optional int32 srcCount = 4;

// 	optional int32 dstCount = 5;
// }