147 lines
12 KiB
Erlang
147 lines
12 KiB
Erlang
|
|
%%----------------------------------------------------
|
|
%% 数据配置文件
|
|
%% @author
|
|
%%----------------------------------------------------
|
|
-module(holiday_role_data).
|
|
-export([cfg/0]).
|
|
-include("data_config.hrl").
|
|
-include("common.hrl").
|
|
-define(holiday_fields, [camp_id, bid, total_id, cli_type, cli_type_name, start_time, end_time, condition, platform_id, platform_exclude_id, hide_srv_ids, sort_val, title, title2, ico, type_ico,
|
|
top_banner, rule_str, time_str, bottom_alert, reward_title, reward, item_effect, mail_subject, mail_content, cli_reward, panel_type, aim_title, process_show_reward, main_ico]).
|
|
cfg() ->
|
|
TimeComment0 = "{open_day, Day} | {open_day, Day, OffSetSec} 开服时间
|
|
{merge_day, Day} | {merge_day, Day, OffSetSec} 合服时间
|
|
{{Year,Month,Day},{Hour,Minu,Sec}} 指定日期
|
|
",
|
|
TimeComment = "{reg_day, Day} | {reg_day, Day, OffSetSec} 开服时间 | {年, 月, 日, 时, 分, 秒}",
|
|
#data_cfg{
|
|
name = holiday_role_data
|
|
,lua_name = holiday_role_data
|
|
,desc = "个人活动配置数据"
|
|
,source = "holiday_role_data.xml"
|
|
,target = "holiday_role_data.erl"
|
|
,inc = ["common.hrl", "holiday.hrl", "condition.hrl"]
|
|
,callback = [
|
|
{list_open_total, cb_fun, handle, {record_list, ["开合服总活动"], holiday_total, all}}
|
|
,{list_open_son, cb_fun, handle, {tuple_type, ["开合服子活动"], total_id, camp_id}}
|
|
,{list_total, cb_fun, handle, {record_list, ["个人总活动"], holiday_total, all}}
|
|
,{all_son, cb_fun, handle, {list, ["个人子活动"]}}
|
|
,{all_son2, cb_fun, handle, {list, ["开合服子活动"]}}
|
|
,{list_son, cb_fun, handle, {tuple_type, ["个人子活动"], total_id, camp_id}}
|
|
,{bid_son, cb_fun, handle, {tuple_type, ["个人子活动"], bid, camp_id}}
|
|
,{get_open, cb_fun, handle, {get_record, ["开合服子活动"], camp_id, holiday, ?holiday_fields}}
|
|
,{{get, undefined}, cb_fun, handle, {get_record, ["个人子活动"], camp_id, holiday, ?holiday_fields}}
|
|
,{{open_ico, 0}, cb_fun, handle, {get_tuple, ["开合服子活动"], camp_id, main_ico}}
|
|
,{{main_ico, 0}, cb_fun, handle, {get_tuple, ["个人子活动"], camp_id, main_ico}}
|
|
,{get_const, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~s) -> ~s; %% ~s", [key,val,desc]}}
|
|
]
|
|
,callback_cli = [
|
|
]
|
|
,sheet = [
|
|
{["开合服总活动"], [
|
|
#f_column{type = int, name = id, desc = "ID", primary = true, mod = all}
|
|
,#f_column{type = bstr, name = name, desc = "名称", mod = all}
|
|
,#f_column{type = int, name = icon_id, desc = "图标", mod = all}
|
|
,#f_column{type = kv, name = type, desc = "类型", kv_type = [{"开服活动", 1}, {"合服活动", 2}], mod = all}
|
|
,#f_column{type = term, name = start_time, desc = "开始时间", add_list_sign = false, comment=TimeComment0}
|
|
,#f_column{type = term, name = end_time, desc = "结束时间", add_list_sign = false, comment=TimeComment0}
|
|
,#f_column{type = kv, name = status, desc = "状态", kv_type = [{"关闭", 0}, {"开启", 1}], mod = all}
|
|
,#f_column{type = kv, name = is_show, desc = "是否打开活动界面", kv_type = bool, mod = all}
|
|
]}
|
|
,{["开合服子活动"], [
|
|
#f_column{type = int, name = camp_id, desc = "活动ID", primary = true, mod = all}
|
|
,#f_column{type = int, name = bid, desc = "基础ID", mod = all}
|
|
,#f_column{type = int, name = total_id, desc = "总活动ID", mod = all}
|
|
,#f_column{type = int, name = cli_type, desc = "客户端类型", mod = all}
|
|
,#f_column{type = bstr, name = cli_type_name, desc = "客户端类型名称", mod = all}
|
|
,#f_column{type = term, name = start_time, desc = "开始时间", add_list_sign = false, comment=TimeComment0, width = 200}
|
|
,#f_column{type = term, name = end_time, desc = "结束时间", add_list_sign = false, comment=TimeComment0, width = 200}
|
|
,#f_column{desc = "开放条件", type = rec, rec = condition, name = condition,
|
|
width = 360, spilt_str = ";", spilt_line = "\n",
|
|
fields = [
|
|
#f_column{type = atom, name = label, desc = "条件标签"}
|
|
,#f_column{type = kv, name = op, kv_type = cond_op, desc = "比较运算符"}
|
|
,#f_column{type = term, add_list_sign = false, name = val, desc = "条件要求值"}
|
|
]
|
|
}
|
|
,#f_column{type = term, name = platform_id, desc = "平台白名单", width = 300, mod = all}
|
|
,#f_column{type = term, name = platform_exclude_id, desc = "平台黑名单", width = 300, mod = all}
|
|
,#f_column{type = term, name = hide_srv_ids, desc = "屏蔽服务器列表", width = 300}
|
|
,#f_column{type = int, name = sort_val, desc = "排序", mod = all}
|
|
,#f_column{type = bstr, name = title, desc = "左侧标题", mod = all}
|
|
,#f_column{type = bstr, name = title2, desc = "顶部横幅", mod = all}
|
|
,#f_column{type = term, name = main_ico, add_list_sign=false, desc = "主城图标", mod = all}
|
|
,#f_column{type = bstr, name = ico, desc = "左侧图标", mod = all}
|
|
,#f_column{type = int, name = type_ico, desc = "类型图标", mod = all}
|
|
,#f_column{type = bstr, name = top_banner, desc = "顶部底图", width = 250, mod = all}
|
|
,#f_column{type = bstr, name = rule_str, desc = "活动规则", width = 360, mod = all}
|
|
,#f_column{type = bstr, name = time_str, desc = "活动时间", mod = all}
|
|
,#f_column{type = bstr, name = bottom_alert, desc = "温馨提示", width = 200, mod = all}
|
|
,#f_column{type = bstr, name = reward_title, desc = "子活动子项背景资源", width = 200, mod = all}
|
|
,#f_column{type = term, name = reward, desc = "奖励", width = 360, mod = all}
|
|
,#f_column{type = term, name = item_effect, desc = "物品特效", mod = all}
|
|
,#f_column{type = bstr, name = mail_subject, desc = "邮件标题", width = 200, mod = all}
|
|
,#f_column{type = bstr, name = mail_content, desc = "邮件内容", width = 360, mod = all}
|
|
,#f_column{type = bstr, name = cli_reward, desc = "客户端奖励", mod = all}
|
|
,#f_column{type = int, name = panel_type, desc = "客户端面板类型", mod = all}
|
|
,#f_column{type = bstr, name = aim_title, desc = "子活动背景资源", width = 200, mod = all}
|
|
,#f_column{type = kv, name = process_show_reward, desc = "处理奖励显示", kv_type=bool, mod = all}
|
|
]}
|
|
,{["个人总活动"], [
|
|
#f_column{type = int, name = id, desc = "ID", primary = true, mod = all}
|
|
,#f_column{type = bstr, name = name, desc = "名称", mod = all}
|
|
,#f_column{type = int, name = icon_id, desc = "图标", mod = all}
|
|
,#f_column{type = kv, name = type, desc = "类型", kv_type = [{"个人注册", 3}], mod = all}
|
|
,#f_column{type = term, name = start_time, desc = "开始时间", add_list_sign = false, comment=TimeComment}
|
|
,#f_column{type = term, name = end_time, desc = "结束时间", add_list_sign = false, comment=TimeComment}
|
|
,#f_column{type = kv, name = status, desc = "状态", kv_type = [{"关闭", 0}, {"开启", 1}], mod = all}
|
|
,#f_column{type = kv, name = is_show, desc = "是否打开活动界面", kv_type = bool, mod = all}
|
|
]}
|
|
,{["个人子活动"], [
|
|
#f_column{type = int, name = camp_id, desc = "活动ID", primary = true, mod = all}
|
|
,#f_column{type = int, name = bid, desc = "基础ID", mod = all}
|
|
,#f_column{type = int, name = total_id, desc = "总活动ID", mod = all}
|
|
,#f_column{type = int, name = cli_type, desc = "客户端类型", mod = all}
|
|
,#f_column{type = bstr, name = cli_type_name, desc = "客户端类型名称", mod = all}
|
|
,#f_column{type = term, name = start_time, desc = "开始时间", add_list_sign = false, comment=TimeComment, width = 200}
|
|
,#f_column{type = term, name = end_time, desc = "结束时间", add_list_sign = false, comment=TimeComment, width = 200}
|
|
,#f_column{desc = "开放条件", type = rec, rec = condition, name = condition,
|
|
width = 360, spilt_str = ";", spilt_line = "\n",
|
|
fields = [
|
|
#f_column{type = atom, name = label, desc = "条件标签"}
|
|
,#f_column{type = kv, name = op, kv_type = cond_op, desc = "比较运算符"}
|
|
,#f_column{type = term, add_list_sign = false, name = val, desc = "条件要求值"}
|
|
]
|
|
}
|
|
,#f_column{type = term, name = platform_id, desc = "平台白名单", width = 300, mod = all}
|
|
,#f_column{type = term, name = platform_exclude_id, desc = "平台黑名单", width = 300, mod = all}
|
|
,#f_column{type = term, name = hide_srv_ids, desc = "屏蔽服务器列表", width = 300}
|
|
,#f_column{type = int, name = sort_val, desc = "排序", mod = all}
|
|
,#f_column{type = bstr, name = title, desc = "左侧标题", mod = all}
|
|
,#f_column{type = bstr, name = title2, desc = "顶部横幅", mod = all}
|
|
,#f_column{type = term, name = main_ico, add_list_sign=false, desc = "主城图标", mod = all}
|
|
,#f_column{type = bstr, name = ico, desc = "左侧图标", mod = all}
|
|
,#f_column{type = int, name = type_ico, desc = "类型图标", mod = all}
|
|
,#f_column{type = bstr, name = top_banner, desc = "顶部底图", width = 250, mod = all}
|
|
,#f_column{type = bstr, name = rule_str, desc = "活动规则", width = 360, mod = all}
|
|
,#f_column{type = bstr, name = time_str, desc = "活动时间", mod = all}
|
|
,#f_column{type = bstr, name = bottom_alert, desc = "温馨提示", width = 200, mod = all}
|
|
,#f_column{type = bstr, name = reward_title, desc = "子活动子项背景资源", width = 200, mod = all}
|
|
,#f_column{type = term, name = reward, desc = "奖励", width = 360, mod = all}
|
|
,#f_column{type = term, name = item_effect, desc = "物品特效", mod = all}
|
|
,#f_column{type = bstr, name = mail_subject, desc = "邮件标题", width = 200, mod = all}
|
|
,#f_column{type = bstr, name = mail_content, desc = "邮件内容", width = 360, mod = all}
|
|
,#f_column{type = bstr, name = cli_reward, desc = "客户端奖励", mod = all}
|
|
,#f_column{type = int, name = panel_type, desc = "客户端面板类型", mod = all}
|
|
,#f_column{type = bstr, name = aim_title, desc = "子活动背景资源", width = 200, mod = all}
|
|
,#f_column{type = kv, name = process_show_reward, desc = "处理奖励显示", kv_type=bool, mod = all}
|
|
]}
|
|
,{["常量配置"], [
|
|
#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 = client}
|
|
]}
|
|
]
|
|
}.
|