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

56 lines
3.2 KiB
Erlang

%%----------------------------------------------------
%% 无尽试炼配置文件
%% @author yzq
%%----------------------------------------------------
-module(holiday_groupon_data).
-export([cfg/0]).
-include("data_config.hrl").
-include("common.hrl").
cfg() ->
#data_cfg{
name = holiday_groupon_data
,lua_name = holiday_groupon_data
,desc = "团购"
,source = "holiday_groupon_data.xml"
,target = "holiday_groupon_data.erl"
,inc = ["common.hrl"]
,callback = [
{{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}}
,{discount, cb_fun, handle, {get_tuple, ["出售物品"], [camp_id, id], discount}}
,{reward, cb_fun, handle, {get_tuple, ["出售物品"], [camp_id, id], [reward, gold, limit, all_limit]}}
,{reward_list, cb_fun, handle, {tuple_type, ["出售物品"], camp_id, [id, reward, gold, limit, all_limit]}}
,{max_count, cb_fun, handle, {get_tuple, ["出售物品"], [camp_id, id], max_count}}
,{ids, cb_fun, handle, {tuple_type, ["出售物品"], camp_id, id}}
,{{get_init, "0"}, cb_fun, handle, {get_tuple, ["出售物品"], [camp_id, id], init_count}}
,{{get_auto_rate, "[]"}, cb_fun, handle, {get_tuple, ["出售物品"], [camp_id, id], auto_rate}}
]
,callback_cli = [
{const, cb_fun_lua, handle, {key_val, ["常量配置"], key, [val, desc]}}
,{holiday_reward, cb_fun_lua, handle, {type_get_val, ["出售物品"], [camp_id, id], [id,reward,gold,discount,limit,all_limit]}}
]
,callback_json = [
{const, cb_fun_json, handle, {key_val, ["常量配置"], key, [val, desc]}}
,{holiday_reward, cb_fun_json, handle, {type_get_val, ["出售物品"], [camp_id, id], [id,reward,gold,discount,limit,all_limit]}}
]
,sheet = [
{["常量配置"],[
#f_column{type = term, name = key, desc = "常量标识", add_list_sign = false,mod = all}
,#f_column{type = term, name = val, desc = "常量值", add_list_sign = false,mod= all}
,#f_column{type = bstr, name = desc, desc = "描述", mod = client}
]}
,{["出售物品"], [
#f_column{type = int, name = camp_id, desc = "活动ID", mod = all}
,#f_column{type = int, name = id, desc = "Id", mod = all}
,#f_column{type = term, name = reward, desc = "物品", mod = all}
,#f_column{type = int, name = gold, desc = "原价", mod = all}
,#f_column{type = int, name = limit, desc = "每日限购", val = "0", mod = all}
,#f_column{type = int, name = all_limit, desc = "总限购", val = "0", mod = all}
,#f_column{type = term, name = discount, desc = "折扣", mod = all, comment = "千分比"}
,#f_column{type = int, name = max_count, desc = "最大数量", mod = all}
,#f_column{type = int, name = init_count, desc = "初始量", mod = server}
,#f_column{type = term, name = auto_rate, desc = "自增量", mod = server}
]}
]
}.