<?php
/**
 * tester
 */
$user = function()
{
	$array = array();
	$info = Dever::load('component/user-state');
	if($info)
	{
		$array += $info;
	}
	return $array;
};

return array
(
	# 表名
	'name' => 'tester',
	# 显示给用户看的名称
	'lang' => '设置体验者',
	'order' => 98,
	'end' => array
	(
		'insert' => array
		(
			'component_applet/tester.update',
		),
		'update' => array
		(
			'component_applet/tester.update',
		),
	),
	# 数据结构
	'struct' => array
	(
		'id' 		=> array
		(
			'type' 		=> 'int-11',
			'name' 		=> 'ID',
			'default' 	=> '',
			'desc' 		=> '',
			'match' 	=> 'is_numeric',
			'search'	=> 'order',
			'list'		=> true,
		),

		'project_id'		=> array
		(
			'type' 		=> 'int-11',
			'name' 		=> '项目',
			'default' 	=> '',
			'desc' 		=> '请输入项目',
			'match' 	=> 'is_numeric',
		),

		'user'		=> array
		(
			'type' 		=> 'varchar-255',
			'name' 		=> '用户-不选择则获取所有用户',
			'default' 	=> '',
			'desc' 		=> '用户',
			'match' 	=> 'option',
			//'search'	=> 'order,fulltext',
			//'update'	=> 'checkbox',
			'option'	=> $user,
			//'list'		=> true,
		),
		
		'name'		=> array
		(
			'type' 		=> 'varchar-60',
			'name' 		=> '微信昵称',
			'default' 	=> '',
			'desc' 		=> '微信昵称',
			'match' 	=> 'is_string',
			'update'	=> 'text',
			'list'		=> true,
		),

		'value'		=> array
		(
			'type' 		=> 'varchar-255',
			'name' 		=> '微信号',
			'default' 	=> '',
			'desc' 		=> '域名',
			'match' 	=> 'is_string',
			'update'	=> 'text',
			'list'		=> 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,
		),
	),

	'top' => Dever::config('base', 'component')->top,

	'manage' => array
	(
		
	),
);