| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 | <?php$info = function(){	$array = array();	$info = Dever::load('set/info-state');	if($info)	{		$array += $info;	}	return $array;};$type = array(	1 => '小程序',	//2 => '微信公众号',);$sex = array(	0 => '未知',	1 => '男',	2 => '女',);return array(	# 表名	'name' => 'user',	# 显示给用户看的名称	'lang' => '用户管理',	'order' => 99,	# 数据结构	'struct' => array	(		'id' 		=> array		(			'type' 		=> 'int-11',			'name' 		=> '用户ID',			'default' 	=> '',			'desc' 		=> '',			'match' 	=> 'is_numeric',			//'search'	=> 'order',			'order'		=> 'desc',			'list'		=> true,		),				'name'		=> array		(			'type' 		=> 'varchar-60',			'name' 		=> '用户昵称',			'default' 	=> '',			'desc' 		=> '请输入用户昵称',			'match' 	=> 'is_string',			'update'	=> 'text',			'search'	=> 'fulltext',			'list'		=> true,		),		'mobile'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '手机号',			'default' 	=> '',			'desc' 		=> '手机号',			'match' 	=> 'is_numeric',			'update'	=> 'text',			'search'	=> 'fulltext',			//'list'		=> true,		),		'pic'		=> array		(			'type' 		=> 'varchar-150',			'name' 		=> '头像',			'default' 	=> '',			'desc' 		=> '请选择头像',			'match' 	=> 'is_string',			'update'	=> 'image',			'key' 		=> '1',			'place'		=> '150',		),		'type'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '用户来源',			'default' 	=> '1',			'desc' 		=> '请选择用户来源',			'match' 	=> 'is_numeric',			'update'	=> 'select',			'option'	=> $type,			'search'	=> 'select',			'list'		=> true,		),		'sex'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '用户性别',			'default' 	=> '1',			'desc' 		=> '请选择用户性别',			'match' 	=> 'is_numeric',			'update'	=> 'select',			'option'	=> $sex,			'search'	=> 'select',			'list'		=> true,		),		'city'		=> array		(			'type' 		=> 'varchar-200',			'name' 		=> '城市',			'default' 	=> '',			'desc' 		=> '请输入用户城市',			'match' 	=> 'is_string',			'update'	=> 'text',			//'search'	=> 'fulltext',			'list'		=> true,		),		'province'		=> array		(			'type' 		=> 'varchar-200',			'name' 		=> '省份',			'default' 	=> '',			'desc' 		=> '请输入用户身份',			'match' 	=> 'is_string',			'update'	=> 'text',			//'search'	=> 'fulltext',			'list'		=> true,		),		'country'		=> array		(			'type' 		=> 'varchar-200',			'name' 		=> '国家',			'default' 	=> '',			'desc' 		=> '请输入用户国家',			'match' 	=> 'is_string',			'update'	=> 'text',			//'search'	=> 'fulltext',			//'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})',		),	),		'manage' => array	(		'insert' => false,		'edit' => false,		'delete' => false,	),		# request 请求接口定义	'request' => array	(			),);
 |