| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 | <?php# 定义几个常用的选项$option = array(	1 => '发送中',	2 => '已发送',);$mobile = Dever::rule('mobile');return array(	# 表名	'name' => 'code',	# 显示给用户看的名称	'lang' => '短信记录表',	'menu' => false,	# 数据结构	'struct' => array	(			'id' 		=> array		(			'type' 		=> 'int-11',			'name' 		=> 'ID',			'default' 	=> '',			'desc' 		=> '',			'match' 	=> 'is_numeric',			'search'	=> 'order',			//'list'		=> true,		),		'mobile'		=> array		(			'type' 		=> 'varchar-32',			'name' 		=> '手机号',			'default' 	=> '',			'desc' 		=> '请输入用户手机号',			'match' 	=> $mobile,			'update'	=> 'text',			'search'	=> 'fulltext',			'list'		=> true,		),		'code'		=> array		(			'type' 		=> 'varchar-32',			'name' 		=> '验证码',			'default' 	=> '',			'desc' 		=> '验证码',			'match' 	=> 'is_string',			'update'	=> 'text',			'search'	=> 'fulltext',			'list'		=> true,		),		'day'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '申请时间',			'default' 	=> '',			'desc' 		=> '申请时间',			'match' 	=> 'is_numeric',			'update'	=> 'text',			'search'	=> 'fulltext',			'list'		=> true,		),		'state'		=> array		(			'type' 		=> 'tinyint-1',			'name' 		=> '状态',			'default' 	=> '1',			'desc' 		=> '请选择状态',			'match' 	=> 'is_numeric',			'option' 	=> $option,			//'update'	=> 'radio',			'list'		=> true,		),				'cdate'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '申请时间',			'match' 	=> array('is_numeric', time()),			'desc' 		=> '',			# 只有insert时才生效			'insert'	=> true,			'search'	=> 'date',			'list'		=> 'date("Y-m-d H:i:s", {cdate})',		),	),);
 |