
local ItemData = require("bag.Proto").ItemData
local BuyItem = require("topup.Proto").BuyItem

-- 查询转盘
CG_ZHUANPAN_QUERY = {
	{"type",              1,         "byte"},         -- 1帮助 2概率
}

RewardData = {
	{"id",                1,          "int"},
	{"item",              1,          ItemData},
	{"chance",            1,          "int"},
	{"getCnt",            1,          "byte"}, -- 已中奖次数
	{"maxCnt",            1,          "byte"}, -- 商品中奖上限
}


LuckData = {
	{"id",                1,          "int"},
	{"item",              1,          ItemData},
	{"status",            1,          "byte"},	-- 状态 0-未领取 1-可领 2-已领
}


RewardRecord = {
    {"id",                1,          "byte"},
    {"tips" ,             1,          "string"},
	{"timer",             1,          "int"},
    {"order",             1,          "int"}
}

DrawChance = {
    {"tips" ,             1,          "string"},
    {"chance" ,           1,          "double"},
}

GC_ZHUANPAN_QUERY = {
	{"type",              1,        "byte"},
	{"refreshTime",       1,        "int"},			   -- 强制刷新时间
	{"freeRefreshTime",   1,        "int"},            -- 免费刷新时间
	{"itemID",            1,        ItemData},         -- 抽奖所需道具
	{"itemCnt",           2,        "short"},          -- 1抽1次花费  2抽多次花费
	{"zuanshiNeed",       1,        ItemData},         -- 刷新花费道具
	{"luck",              1,        "short"},          -- 幸运值
	{"luckList",          10,       LuckData},          -- 幸运值
	{"record",            15,       RewardRecord},     -- 奖励记录
	{"list",              8,        RewardData},
	{"drawCnt",			  1,		"byte"},		   -- 多次许愿次数(普通15次，高级10次)
    {"needLv",		      1,		"short"},		   -- 需要等级
	{"needVipLv",		  1,		"byte"},		   -- 多次许愿开启需要VIP等级
    {"chanceList",		  50,		DrawChance},	   -- 概率预览
    {"red1",              1,        "byte"},
    {"red2",              1,        "byte"},
    {"isFirst",           1,        "byte"},            -- 单日第一次
}

-- 刷新
CG_ZHUANPAN_REFRESH = {
	{"type",               1,          "byte"},
}

-- 抽奖
CG_ZHUANPAN_GET_REWARD = {
	{"type",               1,          "byte"},
	{"cnt",                1,          "short"},
}

GC_ZHUANPAN_GET_REWARD = {
	{"type",              1,           "byte"},
	{"list",              15,          "short"},
    {"luckItem",          2,           ItemData},
    {"item",              15,          ItemData},
}

-- 获取进度奖励
CG_ZHUANPAN_GET_LUCK = {
    {"type", 1,  "byte"},
    {"id",   1,  "short"},
}


-- 购买许愿珠
CG_BUY_ZHUANPAN_CNT = {
	{"type",           1,            "byte"},     -- 1基础转盘  2高级转盘
	{"cnt",            1,            "int"},
}

GC_BUY_ZHUANPAN_CNT = {
}


-- 精灵祝福
CG_XUNXING_JINGLINGZHUFU = {}

GC_XUNXING_JINGLINGZHUFU = {
    {"cnt",1,"byte"},           -- 随机次数
}




-------------------------------寻星礼包----------------------------------

ZHUANPAN_GIFT_INFO = {
    {"buyItem",     1,      BuyItem},       -- 直购信息
    {"nowBuyCnt",   1,      "short"},       -- 当前已购买次数
    {"maxBuyCnt",   1,      "short"},       -- 最大可购买次数
    {"giftItem",    4,      ItemData},   	-- 礼包道具
}

CG_ZHUANPAN_GIFT_QUERY = {}

GC_ZHUANPAN_GIFT_QUERY = {
	{"giftArr",		6,			ZHUANPAN_GIFT_INFO},           -- 寻星礼包
}

-- 每日固定奖励查询
CG_ZHUANPAN_DAILY_FIXED_QUERY = {}

GC_ZHUANPAN_DAILY_FIXED_QUERY = {
	{"reward",      2,          ItemData},  -- 奖励物品列表（最多2个，渠道11返回1个，渠道18返回2个）
	{"status",      1,          "byte"},   -- 状态 0-不可领取 1-可领取 2-已领取 3-未激活
}

-- 每日固定奖励领取
CG_ZHUANPAN_DAILY_FIXED_GET = {
	{"channelId",   1,          "int"},  -- 渠道ID
}

-- 抖音渠道一次性奖励查询
CG_ZHUANPAN_ONCE_REWARD_QUERY = {

}

GC_ZHUANPAN_ONCE_REWARD_QUERY = {
	{"reward",      3,          ItemData},  -- 奖励物品列表（3个：102,500; 118,10; 111,100000）
	{"status",      1,          "byte"},   -- 状态 0-不可领取 1-可领取 2-已领取
}

-- 抖音渠道一次性奖励领取
CG_ZHUANPAN_ONCE_REWARD_GET = {
	{"channelId",   1,          "int"},  -- 渠道ID
}

-- 美团订阅奖励查询（同时可上报订阅状态）
CG_ZHUANPAN_SUBSCRIBE_REWARD_QUERY = {
	{"mtSubscribe", 1, "int"},  -- 订阅状态：0未订阅；1已订阅
}

GC_ZHUANPAN_SUBSCRIBE_REWARD_QUERY = {
	{"reward",      2,          ItemData},  -- 奖励物品列表（2个：101,50000; 112,100）
	{"status",      1,          "byte"},   -- 状态 0-不可领取 1-可领取 2-已领取 
}

-- 美团订阅奖励领取
CG_ZHUANPAN_SUBSCRIBE_REWARD_GET = {
	{"channelId",   1,          "int"},  -- 渠道ID
}


-----------------------淘宝小程序桌面活动-----------------------

-- 添加桌面上报
CG_ZHUANPAN_TB_ADD_DESKTOP = {}

-- 桌面活动查询
CG_ZHUANPAN_TB_QUERY = {
	{"status",  1,  "byte"},  -- 1=桌面进入 2=二楼进入
}

GC_ZHUANPAN_TB_QUERY = {
	{"isDesktopAdded",           1,  "byte"},    -- 是否已添加桌面 0否 1是
	{"isDesktopRewardReceived",  1,  "byte"},    -- 是否已领取添加桌面奖励（仅1次）0否 1是
	{"isEnterRewardReceived",    1,  "byte"},    -- 是否已领取桌面进入奖励（每日1次）0否 1是
	{"isFloorRewardReceived",    1,  "byte"},    -- 是否已领取二楼进入奖励（每日1次）0否 1是
	{"enterReward",              1,  ItemData},  -- 桌面进入奖励道具
	{"floorReward",              1,  ItemData},  -- 二楼进入奖励道具
	{"desktopReward",            1,  ItemData},  -- 添加桌面奖励道具
}

-- 活动奖励领取
CG_ZHUANPAN_TB_REWARD_GET = {
	{"status",  1,  "byte"},  -- 1=桌面进入奖励 2=二楼进入奖励 3=添加桌面奖励(仅1次)
}


-----------------------游戏圈任务-----------------------

YOUXI_TASK_DATA = {
	{"taskId",   1,  "byte"},   -- 任务ID (1-5)
	{"status",   1,  "byte"},   -- 0=未完成 1=待领取 2=已领取
	{"progress", 1,  "short"},  -- 当前进度
	{"target",   1,  "short"},  -- 目标数量
	{"reward",   1,  ItemData}, -- 奖励物品
}

-- 游戏圈任务查询（前端上传SDK数据，后端计算进度）
CG_ZHUANPAN_YOUXI_TASK_QUERY = {
	{"joinTime",     1,  "int"},   -- SDK field1: 加入游戏圈时间戳（0表示未加入）
	{"likeCount",    1,  "short"}, -- SDK field4: 当天点赞贴子数
	{"commentCount", 1,  "short"}, -- SDK field5: 当天评论贴子数
}

GC_ZHUANPAN_YOUXI_TASK_QUERY = {
	{"tasks",  5,  YOUXI_TASK_DATA},  -- 任务列表（共5个）
}

-- 游戏圈任务领取
CG_ZHUANPAN_YOUXI_TASK_GET = {
	{"taskId",  1,  "byte"},  -- 任务ID (1-5)
}


-----------------------添加桌面-----------------------

-- 上报添加桌面（前端确认添加后调用）
CG_ZHUANPAN_DY_DESKTOP_SET = {
	{"channelId",  1,  "int"},     -- 渠道ID
	{"platform",   1,  "string"},  -- 平台标识（如 "douyin"、"meituan" 等）
}

-- 查询桌面添加状态
CG_ZHUANPAN_DY_DESKTOP_QUERY = {
	{"channelId",  1,  "int"},     -- 渠道ID
	{"platform",   1,  "string"},  -- 平台标识
}

GC_ZHUANPAN_DY_DESKTOP_QUERY = {
	{"channelId",      1,  "int"},     -- 渠道ID
	{"platform",       1,  "string"},  -- 平台标识
	{"isDesktopAdded", 1,  "byte"},    -- 是否已添加桌面 0否 1是
}

