| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 | 
							- <?php
 
- # 定义几个常用的选项
 
- $option = array
 
- (
 
- 	1 => '显示',
 
- 	2 => '不显示',
 
- );
 
- /*
 
- $type = function()
 
- {
 
- 	return Dever::load('message/type-all');
 
- };
 
- */
 
- $type = array
 
- (
 
- 	//1 => '系统消息',
 
- 	2 => '系统通知',
 
- );
 
- return array
 
- (
 
- 	# 表名
 
- 	'name' => 'outbox',
 
- 	# 显示给用户看的名称
 
- 	'lang' => '发件箱',
 
- 	'order' => 19,
 
- 	//'menu'	=> false,
 
- 	# 数据结构
 
- 	'struct' => array
 
- 	(
 
- 		'id' 		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> 'ID',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '',
 
- 			'match' 	=> 'is_numeric',
 
- 			'search'	=> 'fulltext',
 
- 			'order'		=> 'desc',
 
- 			'list'		=> true,
 
- 		),
 
- 		'uid'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '发件人',
 
- 			'default' 	=> '-1',
 
- 			'desc' 		=> '请填写发件人',
 
- 			'match' 	=> 'is_numeric',
 
- 			'search'	=> 'fulltext',
 
- 			//'update'	=> 'text',
 
- 			'list'		=> '{uid} > 0 ? {uid} : "系统"',
 
- 		),
 
- 		'name'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-30',
 
- 			'name' 		=> '发件标题',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '请填写发件标题',
 
- 			'match' 	=> 'is_string',
 
- 			'search'	=> 'fulltext',
 
- 			'update'	=> 'text',
 
- 			'list'		=> true,
 
- 		),
 
- 		'content'		=> array
 
- 		(
 
- 			'type' 		=> 'text-255',
 
- 			'name' 		=> '发件内容',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '请填写发件内容',
 
- 			'match' 	=> 'is_string',
 
- 			'search'	=> 'fulltext',
 
- 			'update'	=> 'textarea',
 
- 			'list'		=> true,
 
- 		),
 
- 		'type'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '消息类型',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '消息类型',
 
- 			'match' 	=> 'is_numeric',
 
- 			'option' 	=> $type,
 
- 			'update'	=> 'select',
 
- 			//'search'	=> '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})',
 
- 		),
 
- 	),
 
- 	
 
- 	'manage' => array
 
- 	(
 
- 		
 
- 	),
 
- 	
 
- 	# request 请求接口定义
 
- 	'request' => array
 
- 	(
 
- 		
 
- 	),
 
- );
 
 
  |