%%-----------------------------------------------------------------------------
%% @Module  :       cloud_buy.hrl
%% @Author  :       J
%% @Email   :       j-som@foxmail.com
%% @Created :       2017-09-21
%% @Description:    众仙云购
%%-----------------------------------------------------------------------------

-record(cloud_buy_kf_mgr_state, {
    subtype_list = [],
    check_timer = 0
}).

-record(subtype_info, {
    subtype = 0,
    sub_pid = 0
}).

-record(cloud_buy_kf_state, {
    custom_act_type = 0,
    custom_act_subtype = 0,
    start_time = 0,
    end_time = 0,
    award_time = 0,
    unlimited_time = 0,
    done_orders = [],
    unfinished_orders = [],
    big_award_id = 0,
    award_open_ref = [],
    unlimited_ref = [],
    clear_unfinished_ref = [],
    last_lucky_orders = [],
    last_big_award_id = 0,
    cur_count = 0
    }).

-record (cloud_order, {
    order_id = 0,
    big_award_id = 0,
    customer_uid = "",
    customer_name = "",
    platform = "",
    server = 0,
    state = 0,
    count = 1,
    time = 0,
    career = 0
    }).

-record (cloud_award_config, {
    id,
    reward_type,
    rewards,
    resouce_id,
    total_count,
    cost,
    award_count,
    happy_awards
    }).

-record (cloud_buy_reward_con, {
    reward_id,
    reward_type,
    reward_list
    }).

-record (cloud_buy_status, {
    subtype = 0,
    big_award_id = 0,
    award_time = 0,
    cur_order,
    req_times
    }).

-define (ORDER_STATE_NONE, 0).
-define (ORDER_STATE_PAID, 1).  %% 已付款
-define (ORDER_STATE_AWARD, 2).
-define (ORDER_STATE_LOSE, 3).
-define (ORDER_STATE_FAIL, 4).  %% 订单失败

