123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275 |
- <?php
- $parent_id = Dever::input('option_parent_id', -1);
- return array
- (
- # 表名
- 'name' => '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' => '*',
- ),
- )
- );
|