| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 | <?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})',		),	),	'request' => array    (        'getNew' => array        (            # 匹配的正则或函数 选填项            'option' => array            (                'day' => 'yes',                'mobile' => 'yes',                'state' => 1,            ),            'type' => 'one',            'order' => array('id' => 'desc'),        ),    ),);
 |