61 lines
3.0 KiB
Erlang
61 lines
3.0 KiB
Erlang
%%----------------------------------------------------
|
|
%% 数据配置文件
|
|
%% @author whjing2011@gmail.com
|
|
%%----------------------------------------------------
|
|
-module(invite_code_data).
|
|
-export([cfg/0]).
|
|
-include("data_config.hrl").
|
|
-include("common.hrl").
|
|
cfg() ->
|
|
#data_cfg{
|
|
name = invite_code_data
|
|
,lua_name = invite_code_data
|
|
,js_name = invite_code_data
|
|
,desc = "配置数据"
|
|
,source = "invite_code_data.xml"
|
|
,target = "invite_code_data.erl"
|
|
,splitv = 1
|
|
,head_rows = 2
|
|
,inc = []
|
|
,callback = [
|
|
{{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}}
|
|
,{list, cb_fun, handle, {list, ["奖励"]}}
|
|
,{get, cb_fun, handle, {get_record, ["奖励"], id, new_map, all}}
|
|
,{list_return, cb_fun, handle, {list, ["回归奖励"]}}
|
|
,{get_return, cb_fun, handle, {get_record, ["回归奖励"], id, new_map, all}}
|
|
]
|
|
,callback_cli = [
|
|
{const, cb_fun_lua, handle, {key_val, ["常量配置"], key, all}}
|
|
,{tesk_list, cb_fun_lua, handle, {key_val, ["奖励"], [id], all}}
|
|
,{return_list, cb_fun_lua, handle, {key_val, ["回归奖励"], [id], all}}
|
|
]
|
|
,callback_json = [
|
|
{const, cb_fun_json, handle, {key_val, ["常量配置"], key, all}}
|
|
,{tesk_list, cb_fun_json, handle, {key_val, ["奖励"], [id], all}}
|
|
,{return_list, cb_fun_json, handle, {key_val, ["回归奖励"], [id], 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 = "任务ID", primary = true, mod = all}
|
|
,#f_column{type = int, name = num, desc = "可领取次数", mod = all}
|
|
,#f_column{type = term, name = conds, desc = "条件", mod = all}
|
|
,#f_column{type = term, name = items, desc = "奖励", mod = all}
|
|
,#f_column{type = bstr, name = desc, desc = "描述", mod = client}
|
|
,#f_column{type = int, name = sort, desc = "排序", mod = client}
|
|
]}
|
|
,{["回归奖励"], [
|
|
#f_column{type = int, name = id, desc = "任务ID", primary = true, mod = all}
|
|
,#f_column{type = int, name = num, desc = "可领取次数", mod = all}
|
|
,#f_column{type = term, name = conds, desc = "条件", mod = all}
|
|
,#f_column{type = term, name = items, desc = "奖励", mod = all}
|
|
,#f_column{type = bstr, name = desc, desc = "描述", mod = client}
|
|
,#f_column{type = int, name = sort, desc = "排序", mod = client}
|
|
]}
|
|
]
|
|
}.
|