%%---------------------------------------------------- %% 数据配置文件 %% @author whjing2011@gmail.com %%---------------------------------------------------- -module(daily_data). -export([cfg/0]). -include("data_config.hrl"). -include("common.hrl"). cfg() -> #data_cfg{ name = daily_data ,lua_name = daily_data ,desc = "配置数据" ,source = "daily_data.xml" ,target = "daily_data.erl" ,inc = ["common.hrl", "daily.hrl"] ,callback = [ {list, cb_fun, handle, {list, ["日常活动"]}} ,{get, cb_fun, handle, {get_record, ["日常活动"], id, daily_data, all}} ,{{mod2id,0}, cb_fun, handle, {get_tuple, ["日常活动"], mod, id}} ,{id2mod, cb_fun, handle, {get_tuple, ["日常活动"], id, mod}} ,{huoli_reward, cb_fun, handle, {get_tuple, ["活力奖励"], num, items}} ,{list_reward, cb_fun, handle, {tuple_list, ["活力奖励"], [num, items]}} ,{{get_const,undefined}, cb_fun, handle, {get_fun, ["常量"], "get_const(~s) -> ~s; %% ~ts", [key, val, desc]}} ] ,callback_cli = [ {richanghuodong, cb_fun_lua, handle, {key_val, ["日常活动"], [id], all}} ,{huoli, cb_fun_lua, handle, {key_val, ["活力奖励"], [num], all}} ,{constant, cb_fun_lua, handle, {key_val, ["常量"], [key], all}} ] ,callback_json = [ {richanghuodong, cb_fun_json, handle, {key_val, ["日常活动"], [id], all}} ,{huoli, cb_fun_json, handle, {key_val, ["活力奖励"], [num], all}} ,{constant, cb_fun_json, handle, {key_val, ["常量"], [key], all}} ] ,sheet = [ {["日常活动"], [ #f_column{type = int, name = id, desc = "编号", primary = true, mod = all} ,#f_column{type = bstr, name = name, desc = "名称", mod = all} ,#f_column{type = kv, name = type, desc = "类型", kv_type = [{"日常任务",1},{"活动",2}], mod = all} ,#f_column{type = int, name = ord, desc = "排序", mod = client} ,#f_column{type = str, name = cli_assets, desc = "产出资产", mod = client} ,#f_column{type = int, name = cli_state, desc = "图标状态", mod = client} ,#f_column{type = int, name = max_num, desc = "每天最大次数", mod = all} ,#f_column{type = atom, name = mod, desc = "模块"} ,#f_column{type = term, name = add_huoli, desc = "每次获得活力", mod = all} ,#f_column{type = int, name = limit_lev, desc = "开放等级", mod = all} ,#f_column{type = str, name = open_time_str, desc = "开放时间", mod = client} ,#f_column{type = term, name = limit_week, desc = "限制开启周", mod = all} ,#f_column{type = term, name = limit_time, desc = "限制每天开启时间", mod = all} ,#f_column{type = int, name = ico, desc = "图标", mod = client} ,#f_column{type = str, name = desc_time, desc = "显示时间", mod = client} ,#f_column{type = str, name = desc, desc = "活动介绍", mod = client} ,#f_column{type = term, name = item_show, desc = "展示物品", mod = client} ,#f_column{type = str, name = desc_cond, desc = "条件描述", mod = client} ,#f_column{type = kv, name = is_use, desc = "是否生效", kv_type=bool, mod = all} ]} ,{["活力奖励"], [ #f_column{type = int, name = num, desc = "活力值", primary = true, mod = all} ,#f_column{type = term, name = items, desc = "奖励物品", comment = "{Bid,Bind,Num}", mod = all} ]} ,{["常量"], [ #f_column{type = int, name = key, desc = "ID", primary = true, mod = all} ,#f_column{type = bstr, name = val, desc = "名称", mod = all} ,#f_column{type = str, name = desc, desc = "描述", mod = all} ]} ] }.