%%%--------------------------------------
%%% @Module  : joy_wish.hrl
%%% @Author  : lhy
%%% @Created : 2019-05-24
%%% @Description:  欢乐许愿
%%%--------------------------------------

-record(joy_wish, {
	    wish_times = #{}    %% 活动开启期间的许愿次数 {Type, SubType} => Times
	}).

-define(sql_joy_wish_select,
	    <<"select `act_type`, `sub_type`, `times` from `custom_act_joy_wish_times` where `role_id` = ~p">>).
-define(sql_joy_wish_replace,
	    <<"replace into `custom_act_joy_wish_times` (`role_id`,`act_type`,`sub_type`,`times`) values(~p,~p,~p,~p)">>).
-define(sql_joy_wish_delete,
	    <<"delete from `custom_act_joy_wish_times` where act_type=~p and sub_type = ~p ">>).
