| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 | <?php$system = function(){	$array = array();	$info = Dever::db('passport/system')->state();	if ($info) {		$array += $info;	}	return $array;};return array(	# 表名	'name' => 'user_system',	# 显示给用户看的名称	'lang' => '用户与项目关联表',	'order' => 10,	'menu'	=> false,	# 数据结构	'struct' => array	(			'id' 		=> array		(			'type' 		=> 'int-11',			'name' 		=> '用户ID',			'default' 	=> '',			'desc' 		=> '',			'match' 	=> 'is_numeric',			'search'	=> 'order,fulltext',			'list'		=> true,		),				'uid'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '用户名',			'default' 	=> '0',			'desc' 		=> '请选择用户',			'match' 	=> 'is_numeric',			'update'	=> 'text',			//'search'	=> 'select',			'search'    => array            (                'api' => 'passport/user-all',                'col' => 'username',                'result' => 'id',            ),			'list'		=> '{uid} > 0 ? Dever::load("passport/user-one#username", {uid}) : "匿名用户"',		),		'system_id'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '所属项目',			'default' 	=> '1',			'desc' 		=> '所属项目',			'match' 	=> 'is_numeric',			'option' 	=> $system,			//'update'	=> 'select',			//'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,			'list'		=> 'date("Y-m-d H:i:s", {cdate})',		),	),);
 |