%%%--------------------------------------
%%% @Module  : vip_bag_onsale.hrl
%%% @Author  : ckx
%%% @Created : 2019-06-17
%%% @Description:  VIP特惠活动
%%%--------------------------------------

-record(vip_bag_onsale, {
	    onsale_state = #{}    %% 活动开启期间的玩家礼包领取情况 {Type, SubType} => [{Grade, Price, Percent}, ...]
	}).

%% 礼包状态
-define(NOT_SHOW, 0).	%% 不显示
-define(ONLY_SHOW, 1).	%% 仅显示
-define(CAN_BUY, 2).	%% 可购买

-define(sql_vip_bag_onsale_select,
	<<"select act_type, sub_type, grade, price, percent from custom_act_vip_bag_onsale where role_id = ~p">>).
-define(sql_vip_bag_onsale_replace,
	<<"replace into custom_act_vip_bag_onsale(role_id, act_type, sub_type, grade, price, percent) values(~p, ~p, ~p, ~p, ~p, ~p)">>).
-define(sql_vip_bag_onsale_delete,
	<<"delete from custom_act_vip_bag_onsale where act_type = ~p and sub_type = ~p">>).