'文本内容',
	2 => '文件资源',
	3 => '富文本内容',
);
$local = array
(
	1 => '是',
	2 => '否',
);
$source = array
(
	1 => '详情页',
	2 => '列表页',
);
$upload = function()
{
	$info = Dever::db('upload/upload')->select();
	return $info;
};
return array
(
	# 表名
	'name' => 'col',
	# 显示给用户看的名称
	'lang' => '采集字段管理',
	'menu' => false,
	# 后台菜单排序
	'order' => 6,
	'desc' => '字段唯一标识符:如果用逗号隔开,则前面的是dever公共函数,如maketime.date,则会调用Dever::maketime()来处理date的数据
	
	点此进行测试:请按住ctrl打开新页面并查看源代码',
	# 数据结构
	'struct' => array
	(
	
		'id' 		=> array
		(
			'type' 		=> 'int-11',
			'name' 		=> 'ID',
			'default' 	=> '',
			'desc' 		=> '',
			'match' 	=> 'is_numeric',
			'search'	=> 'order',
			'list'		=> true,
			'order'		=> 'desc',
		),
		'name'		=> array
		(
			'type' 		=> 'varchar-100',
			'name' 		=> '字段名称',
			'default' 	=> '',
			'desc' 		=> '字段名称',
			'match' 	=> 'is_string',
			'update'	=> 'text',
			'search'	=> 'fulltext',
			'list'		=> true,
			'edit'		=> true,
		),
		'key'		=> array
		(
			'type' 		=> 'varchar-100',
			'name' 		=> '字段唯一标识符',
			'default' 	=> '',
			'desc' 		=> '字段唯一标识符',
			'match' 	=> 'is_string',
			'update'	=> 'text',
			'search'	=> 'fulltext',
			'list'		=> true,
			'edit'		=> true,
		),
		'pid'		=> array
		(
			'type' 		=> 'int-11',
			'name' 		=> '项目id',
			'default' 	=> Dever::input('search_option_pid', -1),
			'desc' 		=> '请选择项目id',
			'match' 	=> 'is_numeric',
			'search'	=> 'order',
			'update'	=> 'hidden',
		),
		'source'		=> array
		(
			'type' 		=> 'tinyint-1',
			'name' 		=> '字段来源',
			'default' 	=> '1',
			'desc' 		=> '字段来源',
			'match' 	=> 'is_numeric',
			'option' 	=> $source,
			'update'	=> 'radio',
			'list'		=> true,
		),
		'type'		=> array
		(
			'type' 		=> 'tinyint-1',
			'name' 		=> '字段类型-如果选择文件类型,将只会保存文件的网络地址',
			'default' 	=> '1',
			'desc' 		=> '字段类型',
			'match' 	=> 'is_numeric',
			'option' 	=> $type,
			'update'	=> 'radio',
			'list'		=> true,
			'control'	=> 'type',
		),
		'local'		=> array
		(
			'type' 		=> 'tinyint-1',
			'name' 		=> '资源是否本地化-资源包括图片、视频等,本地化后将转成本地地址',
			'default' 	=> '2',
			'desc' 		=> '资源是否本地化',
			'match' 	=> 'is_numeric',
			'option' 	=> $local,
			'update'	=> 'radio',
			'control'	=> 'local',
		),
		'res_key'		=> array
		(
			'type' 		=> 'int-11',
			'name' 		=> '资源库-选择资源库,将根据配置传入到相应的资源库里',
			'default' 	=> '1',
			'desc' 		=> '资源库ID',
			'match' 	=> 'is_numeric',
			'update'	=> 'select',
			'option' 	=> $upload,
			'show'		=> 'local=1',
		),
		
		'collect_rule'		=> array
		(
			'type' 		=> 'varchar-500',
			'name' 		=> '采集规则-支持dom解析、JSON、正则,dom解析如$(".info .title a").html(),JSON如data.url,正则就是正则表达式,如果想直接用其他字段,直接输入其他字段的唯一标识符即可,输入第二行可以解析其他字段',
			'default' 	=> '',
			'desc' 		=> '采集规则',
			'match' 	=> 'is_string',
			'update'	=> 'textarea',
			'list'		=> true,
			'edit'		=> 'textarea',
		),
		'collect_include'		=> array
		(
			'type' 		=> 'varchar-500',
			'name' 		=> '包含字符-如果填写该项,则只保留包含有该字符的,多个换行隔开,多个是或的关系',
			'default' 	=> '',
			'desc' 		=> '采集规则',
			'match' 	=> 'option',
			'update'	=> 'textarea',
		),
		'collect_exclude'		=> array
		(
			'type' 		=> 'varchar-500',
			'name' 		=> '不包含字符-如果填写该项,则只保留不包含有该字符的,多个换行隔开,多个是且的关系',
			'default' 	=> '',
			'desc' 		=> '采集规则',
			'match' 	=> 'option',
			'update'	=> 'textarea',
		),
		'collect_filter'		=> array
		(
			'type' 		=> 'varchar-500',
			'name' 		=> '过滤规则-如果填写该项,则过滤掉符合该规则的字符,仅支持字符串和正则,输入=>可以替换成后边的字符,如不如输入则过滤为空,多个换行隔开',
			'default' 	=> '',
			'desc' 		=> '采集规则',
			'match' 	=> 'option',
			'update'	=> 'textarea',
		),
		'collect_filter_link'		=> array
		(
			'type' 		=> 'tinyint-1',
			'name' 		=> '是否过滤链接-将过滤内容中的链接',
			'default' 	=> '2',
			'desc' 		=> '是否过滤链接',
			'match' 	=> 'is_numeric',
			'option' 	=> $local,
			'update'	=> 'radio',
			'control'	=> 'local',
		),
		'collect_url'		=> array
		(
			'type' 		=> 'varchar-500',
			'name' 		=> '采集链接规则-如果当前页面里需要采集下一页内容,这里可以设置获取下一页内容的链接规则,第二行可以输入链接中要包含的字符',
			'default' 	=> '',
			'desc' 		=> '采集链接规则',
			'match' 	=> 'option',
			'update'	=> 'textarea',
			//'list'		=> true,
			'edit'		=> 'textarea',
		),
		'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,
			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
		),
	),
	'request' => array
	(
		'getList' => array
		(
			'where' => array
			(
				'pid' => 'yes',
				'state' => 1,
			),
			'type' => 'all',
			'order' => array
			(
				'id' => 'desc',
			),
			'col' => '*|source|key|',
		),
	)
);