'times', # 显示给用户看的名称 'lang' => '时光管理', # 是否显示在后台菜单 'order' => 1, 'menu' => false, # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => 'ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', 'order' => 'asc', 'list' => true, ), 'info_id' => array ( 'type' => 'int-11', 'name' => '合集', 'default' => '', 'desc' => '合集', 'match' => 'is_numeric', 'update' => 'hidden', 'value' => Dever::input('search_option_info_id') ), 'source_id' => array ( 'type' => 'int-11', 'name' => '来源id-一般为采集器的采集规则id,用以区分导入的数据是否重复', 'default' => '-1', 'desc' => '来源id', 'match' => 'is_numeric', ), 'name' => array ( 'type' => 'varchar-150', 'name' => '时光名称', 'default' => '', 'desc' => '时光名称', 'match' => 'is_string', 'update' => 'text', 'search' => 'fulltext', 'list' => true, 'edit' => true, ), 'year' => array ( 'type' => 'int-11', 'name' => '开始年份-影响当前时光下所有发布内容的时间,如果用户未选择时间,则自动使用开始年份作为时间的年份', 'default' => '', 'desc' => '年份', 'match' => 'is_numeric', 'update' => $parent_id < 0 ? 'hidden': 'year', 'search' => 'text', //'order' => 'desc', 'list' => true, ), 'end_year' => array ( 'type' => 'int-11', 'name' => '结束年份-影响当前时光下所有发布内容的时间', 'default' => '', 'desc' => '年份', 'match' => 'option', 'update' => $parent_id < 0 ? 'hidden': 'year', 'search' => 'text', 'order' => 'desc', 'list' => true, ), 'parent_id' => array ( 'type' => 'int-11', 'name' => '上级时光', 'default' => '-1', 'desc' => '请选择上级时光', 'match' => 'is_numeric', 'update' => 'hidden', 'value' => $parent_id, 'list' => '{parent_id} > 0 ? Dever::load("collection/times-one#name", {parent_id}) : "主时间线"', ), 'icon' => array ( 'type' => 'varchar-150', 'name' => '时光图标-图片尺寸80*80px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式', 'default' => '', 'desc' => '时光图标', 'match' => 'option', 'update' => $parent_id < 0 ? 'hidden': 'image', 'key' => '1', 'place' => '80*80', ), 'pic' => array ( 'type' => 'varchar-150', 'name' => '图片-图片尺寸330*330px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式', 'default' => '', 'desc' => '图片', 'match' => 'option', 'update' => $parent_id < 0 ? 'hidden': 'image', 'key' => '1', 'place' => '330*330', ), 'desc' => array ( 'type' => 'varchar-800', 'name' => '描述', 'default' => '', 'desc' => '描述', 'match' => 'option', 'update' => $parent_id < 0 ? 'hidden': 'text', //'list' => true, ), 'color' => array ( 'type' => 'varchar-10', 'name' => '文字颜色-默认为白色', 'default' => '#ffffff', 'desc' => '文字颜色', 'match' => 'is_string', 'update' => $parent_id < 0 ? 'hidden': 'color', ), 'bgcolor' => array ( 'type' => 'varchar-10', 'name' => '背景颜色-默认为灰色', 'default' => '#cccccc', 'desc' => '背景颜色', 'match' => 'is_string', 'update' => $parent_id < 0 ? 'hidden': 'color', ), 'reorder' => array ( 'type' => 'int-11', 'name' => '排序(数值越小越靠前)', 'default' => '1', 'desc' => '请输入排序', 'match' => 'option', 'update' => 'text', 'search' => 'order', 'list_name' => '排序', 'list' => true, 'order' => 'asc', 'edit' => true, ), 'state' => array ( 'type' => 'tinyint-1', 'name' => '状态', 'default' => '1', 'desc' => '请选择状态', 'match' => 'is_numeric', ), 'cdate' => array ( 'type' => 'int-11', 'name' => '录入时间', 'match' => array('is_numeric', time()), 'desc' => '', # 只有insert时才生效 'insert' => true, 'order' => 'asc', //'search' => 'date', 'list' => 'date("Y-m-d H:i:s", {cdate})', ), ), 'manage' => array ( # 列表页的类型 'list_type' => 'tree', 'list_button' => array ( 'update' => array('编辑', 'times&option_parent_id={parent_id}'), 'add' => array('新增时间线', '"{parent_id}" == -1 ? "times&option_parent_id={id}" : "times&option_parent_id={parent_id},{id}"', '{parent_id} == -1'), 'list5' => array('章节', '"page&search_option_info_id={info_id}&search_option_times_id_parent={times_id}&search_option_times_id={id}&oper_table=times&top_table=info"' , '{parent_id} > 0'), 'delete' => '删除', ), ), 'request' => array ( 'child' => array ( 'option' => array ( 'state' => 1, 'parent_id' => 'yes', 'info_id' => 'yes', ), 'type' => 'all', 'order' => array('year' => 'asc', 'reorder' => 'asc', 'id' => 'asc'), 'col' => '*', ), 'main' => array ( 'option' => array ( 'state' => 1, 'parent_id' => -1, 'info_id' => 'yes', ), 'type' => 'all', 'order' => array('year' => 'asc', 'reorder' => 'asc', 'id' => 'asc'), 'col' => '*', ), 'mainAll' => array ( 'option' => array ( 'state' => 1, 'parent_id' => -1, 'info_id' => 'yes', ), 'type' => 'all', 'order' => array('year' => 'asc', 'reorder' => 'asc', 'id' => 'asc'), 'col' => '*|id', ), # 取所有下级 'childAll' => array ( 'option' => array ( 'parent_id' => array(1, '>='), 'info_id' => 'yes', 'state' => 1, ), 'type' => 'all', 'order' => array('year' => 'asc', 'reorder' => 'asc', 'id' => 'asc'), 'col' => '*|parent_id|id|', ), 'getNew' => array ( 'option' => array ( 'state' => 1, 'parent_id' => array(1, '>='), 'year' => 'yes', 'info_id' => 'yes', ), 'type' => 'one', 'order' => array('year' => 'asc', 'reorder' => 'asc', 'id' => 'asc'), 'col' => '*', ), ) );