%%------------------------------------------------------------
%% @Module  :       module_advance.hrl
%% @Author  :       tyl
%% @Created :       2020-07-09
%% @Description:    功能预告
%%------------------------------------------------------------

-define(CAN_NOT_REWARD,      0).    %% 不可领
-define(FUNC_REWARDING,      1).    %% 可领未领
-define(FUNC_REWARDED,       2).    %% 可领已领

%% -------------------------- 配置 ---------------------------
%% 新功能引导
-record(base_module_advance, {
	id = 0,             %% 唯一id
	index = 0,          %% 序号
	name = "",          %% 功能名字
	dynamic_resource = "", %% 动态资源
	icon = "",          %% icon
	condition = [],     %% 条件
	con_desc = "",      %% 条件描述
	func_desc = "",     %% 功能描述
	jump = "",          %% 跳转
	reward = [],        %% 奖励
	model_res = "",      %% 模型资源
	open_day = 0,       %% 开服天数限制
	title_pic = ""      %% 标题图片
	,mod_desc1 = ""     %% 功能描述1
	,mod_desc2 = ""     %% 功能描述2
}).

%% -------------------------- sql ---------------------------
-define(SQL_REPLACE_ROLE_MODULE_ADVANCE,
	<<"replace into role_module_advance set role_id = ~p, func_id = ~p, reward_state = ~p">>).
-define(SQL_SELECT_ROLE_MODULE_ADVANCE,
	<<"select func_id, reward_state from role_module_advance where role_id = ~p">>).

-define(SQL_ROLE_MODULE_ADVANCE_BATCH_REPLACE,
	<<"replace into role_module_advance(role_id, func_id, reward_state) values ~ts">>).

-define(SQL_ROLE_MODULE_ADVANCE_BATCH_VALUES,
	<<"(~p, ~p, ~p)">>).

