
-define(TICKET_WISH, 0).    %交易券祈愿
-define(LUXURY_WISH, 1).    %豪华祈愿
-define(EXPERIENCE_WISH, 2).%经验祈愿

-define(FREECD, prayer_).
-define(EXCHANGE_TIMES, prayer_times_).

% -define(MOD_CURRENCYWISH, 340).

-define(COUNTER_LUXURY_DAILY_TIMES, ?LUXURY_WISH).  %豪华祈愿每日计数器的功能id
-define(COUNTER_EXPERIENCE_DAILY_TIMES, ?EXPERIENCE_WISH).  %经验祈愿每日计数器的功能id
% 记录角色最后一次使用免费抽奖的时间
-record(role_currencywish,{
    % roleid,
    lastfreetimemap = #{}   % wishtype=>Val  for example: 0 => Ticket_last, 1 => Luxury_last, 2 => Experience_last
}).




-define(SQL_CURRENCYWISH_SELECT, <<"select `ticket_free_last`, `luxury_free_last`, `expr_free_last` from `role_currencywish_freelast` where roleid = ~p">>).

-define(SQL_CURRENCYWISH_REPLACE, <<"replace into `role_currencywish_freelast` (`roleid`,`ticket_free_last`,`luxury_free_last`,`expr_free_last`) VALUES (~p,~p,~p,~p)">>).

% -define(SQL_CURRENCYWISH_UPDATE, <<"update `role_currencywish_freelast` set `ticket_free_last` = ~p, `luxury_free_last` = ~p, `expr_free_last` = ~p where roleid = ~p">>).