| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 | 
							- <?php
 
- return array
 
- (
 
- 	# 表名
 
- 	'name' => 'relation',
 
- 	# 显示给用户看的名称
 
- 	'lang' => '邀请关系',
 
- 	# 是否显示在后台菜单
 
- 	'order' => 9,
 
- 	'menu'	=> false,
 
- 	# 数据结构
 
- 	'struct' => array
 
- 	(
 
- 		'id' 		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> 'ID',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '',
 
- 			'match' 	=> 'is_numeric',
 
- 			//'list'		=> true,
 
- 		),
 
- 		'uid' 		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '邀请人',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '邀请人',
 
- 			'match' 	=> 'is_numeric',
 
- 			'list'		=> true,
 
- 		),
 
- 		'to_uid' 		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '被邀请人',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '被邀请人',
 
- 			'match' 	=> 'is_numeric',
 
- 			'list'		=> true,
 
- 		),
 
- 		'level' 		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '邀请级数',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '邀请级数',
 
- 			'match' 	=> 'is_numeric',
 
- 			'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})',
 
- 		),
 
- 	),
 
- 	'manage' => array
 
- 	(
 
- 		'delete' => false,
 
- 		'edit' => false,
 
- 		'insert' => false,
 
- 	),
 
- 	'request' => array
 
- 	(
 
- 		'getChild' => array
 
- 		(
 
- 			# 匹配的正则或函数 选填项
 
- 			'option' => array
 
- 			(
 
- 				'uid' => 'yes',
 
- 				'level' => array('yes', '<='),
 
- 				'end' => array('yes-cdate', '<=')
 
- 			),
 
- 			'type' => 'all',
 
- 			'order' => array('id' => 'desc'),
 
- 			'page' => array(10, 'list'),
 
- 			'col' => '*',
 
- 		),
 
- 		'getChildCount' => array
 
- 		(
 
- 			# 匹配的正则或函数 选填项
 
- 			'option' => array
 
- 			(
 
- 				'uid' => 'yes',
 
- 				'level' => array('yes', '<='),
 
- 				'end' => array('yes-cdate', '<=')
 
- 			),
 
- 			'type' => 'count',
 
- 			'order' => array('id' => 'desc'),
 
- 			'col' => '*',
 
- 		),
 
- 		'getParent' => array
 
- 		(
 
- 			# 匹配的正则或函数 选填项
 
- 			'option' => array
 
- 			(
 
- 				'to_uid' => 'yes',
 
- 				'level' => array('yes', '<='),
 
- 			),
 
- 			'type' => 'all',
 
- 			'order' => array('id' => 'desc'),
 
- 			'col' => '*',
 
- 		),
 
- 		'getParent' => array
 
- 		(
 
- 			# 匹配的正则或函数 选填项
 
- 			'option' => array
 
- 			(
 
- 				'to_uid' => 'yes',
 
- 				'level' => array('yes', '<='),
 
- 			),
 
- 			'type' => 'all',
 
- 			'order' => array('id' => 'desc'),
 
- 			'col' => '*',
 
- 		),
 
- 	)
 
- );
 
 
  |