%%%-------------------------------------------------------------------
%%% @doc     拼图头文件
%%% Module  : great_rewards.hrl
%%% Created : 2020-12-22
%%% @author :tyl
%%% @end
%%%-------------------------------------------------------------------

-define(GREAT_REWARD_TYPE_RECHARGE, 1).     %% 充值
-define(GREAT_REWARD_TYPE_CONSUME,  2).     %% 消费
-define(GREAT_REWARD_TYPE_BIG_REWARD,  3).  %% 终极大奖

%% 奖励领取状态
-define(GREAT_REWARD_CANNOT_RECEIVE, 0).     %% 未能领取
-define(GREAT_REWARD_CAN_RECEIVE,    1).     %% 可以领取
-define(GREAT_REWARD_HAS_RECEIVED,   2).     %% 已经领取

-record(great_reward, {
	reward_map = #{}         %% 当前已经兑换奖励档位#{type=>[grade_id...]},type 1:充值 2:消费
	,recharge  = 0           %% 充值金额
	,consume   = 0           %% 消费金额
}).

%% db处理
-define(SELECT_GREAT_REWARD_ACTIVE_ROLES, <<"SELECT `id` FROM `player_low` WHERE `lv` >= ~p ">>).
-define(SELECT_GREAT_REWARD_CUSTOM_ACT_DATA, <<"select `act_data` from `custom_act_data` where `rid`=~p and `type`=~p and `subtype`=~p">>).