%%%---------------------------------------------------------------------
%%% 个性装扮相关record定义
%%%---------------------------------------------------------------------
-define(DRESS_DEFAULT_LV, 90).    %% 装扮默认开启的玩家等级

-define(DRESS_UP_BUBBLE,1).             %% 气泡
-define(DRESS_UP_FRAME,2).              %% 相框
-define(DRESS_UP_BACKGROUND,3).         %% 背景

-define(DRESS_ISUSING, 1).                  %% 装扮正在使用
-define(DRESS_UNUSING, 0).                  %% 装扮未被使用

-define(DEFAULT_DRESS_LIST,                 %% 默认装扮[{Type, DressId}...]
    [{1, data_dress_up:get_default_dress(1,1)},
    {2, data_dress_up:get_default_dress(2,1)},
    {3, data_dress_up:get_default_dress(3,1)}
    ]).
-define(DEFAULT_DRESS_ID, data_dress_up:get_default_dress_list(1)).  %% 默认装扮Id

-define(GM,            1).              %% GM
-define(INSTRUCTOR,    2).              %% 指导员

-record(status_dress_up,
    {
        enabled_map = #{},                  %%激活数据 #{DressType=>[DressId...]...}
        using_map = #{},                    %%正在使用的装扮#{dress_type => dress_id}
        attr = [],                          %%属性
        power = 0                           %%
    }).

%% ------------------------- base相关宏定义 --------------------------

%%装扮激活
-record(base_dress_up,
    {
        dress_id = 0,                   %% 装扮id
        dress_type = 0,                 %% 装扮类型
        dress_name = "",                %% 装扮名称
        dress_desc = "",                %% 装扮描述
        dress_consume_id = 0,           %% 消耗材料id
        dress_attr = [],                %% 当前属性
        is_default = 0                  %% 0-普通装扮  1-默认装扮
        ,sequence = 0                   %% 展示顺序
        ,open_day = 0                   %% 开启天数
        ,open_time = ""                 %% 开启时间
    }).


-define(sql_dress_up_enabled_select, <<"select dress_id, dress_type, is_used from dress_up_enabled where player_id = ~p ">>).
-define(sql_dress_up_replace_enabled, <<"replace into dress_up_enabled(player_id, dress_id, dress_type, is_used, time) values(~p,~p,~p,~p,~p) ">>).
-define(sql_dress_up_update_enabled, <<"update dress_up_enabled set is_used = ~p, time = ~p where player_id = ~p and dress_id = ~p ">>).
-define(sql_dress_up_delete_enabled, <<"delete from dress_up_enabled where player_id = ~p and dress_id = ~p">>).
-define(sql_dress_up_update_used, <<"update dress_up_enabled set is_used = ~p, time = ~p where player_id = ~p and is_used = 1 and dress_type = ~p limit 1 ">>).