Files
fc/server/tools/gen_data/cfg/activity_exchange_data.erl
T
2026-05-23 22:10:14 +08:00

60 lines
2.6 KiB
Erlang

%%%-------------------------------------------------------------------
%%% @author Administrator
%%% @copyright (C) 2024, <COMPANY>
%%% @doc
%%%
%%% @end
%%% Created : 29. 5月 2024 16:23
%%%-------------------------------------------------------------------
-module(activity_exchange_data).
-author("Administrator").
-export([cfg/0
]).
-include("data_config.hrl").
-include("common.hrl").
cfg() ->
#data_cfg{
name = activity_exchange_data
,lua_name = activity_exchange_data
,desc = "配置数据"
,source = "activity_exchange_data.xml"
,target = "activity_exchange_data.erl"
,inc = ["common.hrl"]
,callback = [
{{get_item, "[]"}, cb_fun, handle, {get_tuple, ["兑换商店"], [camp_id, order], [item_bid, item_num, pay_id, price, limit]}},
{{get_list, "[]"}, cb_fun, handle, {tuple_type, ["兑换商店"], camp_id, [order, item_bid, item_num, pay_id, price, limit]}},
{get_const, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~s) -> ~s; %% ~ts", [key,val,desc]}}
]
,callback_cli = [
]
,callback_json = [
{shop_exchange_cost, cb_fun_json, handle, {key_val, [ "常量配置"], [key], all}}
,{shop_exchange_gold, cb_fun_json, handle, {type_get_val, ["兑换商店"], [camp_id, order], all}}
,{shop_exchange_show, cb_fun_json, handle, {key_val, ["前端显示"], [camp_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,val_cli="0", mod = all}
,#f_column{type = bstr, name = desc, desc = "描述", mod = all}
]},
{["兑换商店"], [
#f_column{type = int, name = camp_id, desc = "ID", mod = all}
,#f_column{type = int, name = order, desc = "序号", mod = client}
,#f_column{type = int, name = item_bid, desc = "物品ID", mod = all}
,#f_column{type = int, name = item_num, desc = "数量", mod = all}
,#f_column{type = int, name = pay_id, desc = "支付类型", mod = all}
,#f_column{type = int, name = price, desc = "价格", mod = all}
,#f_column{type = int, name = limit, desc = "限购", mod = all}
]},
{["前端显示"], [
#f_column{type = int, name = camp_id, desc = "ID", mod = all}
,#f_column{type = bstr, name = model, desc = "模型", mod = client}
,#f_column{type = bstr, name = act, desc = "动作名", mod = all}
,#f_column{type = int, name = item2, desc = "道具1", mod = all}
,#f_column{type = int, name = item1, desc = "道具2", mod = all}
]}
]
}.