67 lines
3.7 KiB
Erlang
67 lines
3.7 KiB
Erlang
%%----------------------------------------------------
|
|
%% 情人节大作战
|
|
%%
|
|
%% @author wujinhan<947537249@qq.com>
|
|
%%----------------------------------------------------
|
|
-module(holiday_valentines_data).
|
|
-export([cfg/0]).
|
|
-include("data_config.hrl").
|
|
-include("common.hrl").
|
|
cfg() ->
|
|
#data_cfg{
|
|
name = holiday_valentines_data
|
|
,lua_name = holiday_valentines_data
|
|
,desc = "情人节大作战"
|
|
,source = "holiday_valentines_data.xml"
|
|
,target = "holiday_valentines_data.erl"
|
|
,inc = ["common.hrl"]
|
|
,callback = [
|
|
{{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}}
|
|
,{score_pro_list, cb_fun, handle, {tuple_list, ["总分匹配库"], [id, min, max, pro]}}
|
|
,{get_score_award, cb_fun, handle, {get_tuple, ["积分奖励库"], id, [count, award]}}
|
|
,{get_interval, cb_fun , handle, {get_tuple, ["自增配置"], id, [pro, interval, time]}}
|
|
,{get_all_interval, cb_fun , handle, {tuple_list, ["自增配置"], [id, pro]}}
|
|
,{get_all_lev, cb_fun , handle, {tuple_list, ["积分奖励库"], [id, count]}}
|
|
,{rank_reward, cb_fun, handle, {get_fun, ["排名奖励"], "rank_reward(Rank) when Rank >= ~ts andalso Rank =< ~ts -> ~ts;", [rank1, rank2, award]}}
|
|
]
|
|
,callback_cli = [
|
|
{const, cb_fun_lua, handle, {key_val, ["常量配置"], key, [val, desc]}}
|
|
,{award, cb_fun_lua, handle, {key_val, ["积分奖励库"], id, all}}
|
|
,{rank_award, cb_fun_lua, handle, {list_val, ["排名奖励"], all}}
|
|
]
|
|
,callback_json = [
|
|
{const, cb_fun_json, handle, {key_val, ["常量配置"], key, [val, desc]}}
|
|
,{award, cb_fun_json, handle, {key_val, ["积分奖励库"], id, all}}
|
|
,{rank_award, cb_fun_json, handle, {list_val, ["排名奖励"], all}}
|
|
]
|
|
,sheet = [
|
|
{["常量配置"], [
|
|
#f_column{type = atom, name = key, desc = "键", primary = true, mod = all}
|
|
,#f_column{type = term, name = val, desc = "值", add_list_sign=false, mod = all}
|
|
,#f_column{type = str, name = desc, desc = "描述", mod = all}
|
|
]}
|
|
,{["积分奖励库"], [
|
|
#f_column{type = int, name = id, desc = "序号", mod = all}
|
|
,#f_column{type = int, name = count, desc = "目标百分比(扩大1000倍)", mod = all}
|
|
,#f_column{type = term, name = award, desc = "奖励", mod = all}
|
|
]}
|
|
,{["自增配置"], [
|
|
#f_column{type = int, name = id, desc = "天数", mod = all}
|
|
,#f_column{type = int, name = pro, desc = "百分比(扩大1000倍)", mod = all}
|
|
,#f_column{type = int, name = interval, desc = "自增间隔(秒)", mod = all}
|
|
,#f_column{type = int, name = time, desc = "自增时间(小时)", mod = all}
|
|
]}
|
|
,{["总分匹配库"], [
|
|
#f_column{type = int, name = id, desc = "序号", mod = all}
|
|
,#f_column{type = int, name = min, desc = "人数下限", mod = all}
|
|
,#f_column{type = int, name = max, desc = "人数上限", mod = all}
|
|
,#f_column{type = int, name = pro, desc = "数值百分比(扩大1000倍)", mod = all}
|
|
]}
|
|
,{["排名奖励"], [
|
|
#f_column{type = int, name = rank1, desc = "排名下限", mod = all}
|
|
,#f_column{type = int, name = rank2, desc = "排名上限", mod = all}
|
|
,#f_column{type = term, name = award, desc = "奖励", mod = all}
|
|
]}
|
|
]
|
|
}.
|