%%%--------------------------------------
%%% @Module  : lucky_wheel.hrl
%%% @Author  : huyihao
%%% @Created : 2018.08.06
%%% @Description:  幸运转盘
%%%--------------------------------------

-define(LuckyWheelLogLen, 50).

-record(lucky_wheel_state, {
    sub_type_list = [],
    check_timer = 0
}).

-record(lucky_wheel_info, {
    sub_type = 0,
    player_list = [],
    log_list = [],
    times_list = []
}).

-record(lucky_wheel_player_info, {
    role_id = 0,
    pleyer_times_list = []
}).

-record(lucky_wheel_reward_con, {
    roll_id = 0,
    reward_list = [],
    weight = 0,
    single_limit = 0,
    all_limit = 0,
    if_chat = 0
}).

-define(SelectLuckyWheelAllLimitAllSql,
    <<"SELECT `sub_type`, `roll_id`, `times` FROM `lucky_wheel_all_limit`">>).
-define(ReplaceLuckyWheelAllLimitSql,
    <<"REPLACE INTO `lucky_wheel_all_limit` (`sub_type`, `roll_id`, `times`) VALUES (~p, ~p, ~p)">>).
-define(DelectLuckyWheelAllLimitSql,
    <<"DELETE FROM `lucky_wheel_all_limit` WHERE `sub_type` IN (~s)">>).

-define(SelectLuckyWheelPlayerLimitAllSql,
    <<"SELECT `sub_type`, `role_id`, `roll_id`, `times` FROM `lucky_wheel_player_limit`">>).
-define(ReplaceLuckyWheelPlayerLimitSql,
    <<"REPLACE INTO `lucky_wheel_player_limit` (`sub_type`, `role_id`, `roll_id`, `times`) VALUES (~p, ~p, ~p, ~p)">>).
-define(DelectLuckyWheelPlayerLimitSql,
    <<"DELETE FROM `lucky_wheel_player_limit` WHERE `sub_type` IN (~s)">>).

