| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 | 
							- <?php
 
- $type = array
 
- (
 
- 	1 => '微信',
 
- 	2 => '支付宝',
 
- );
 
- $status = array
 
- (
 
- 	1 => '申请中',
 
- 	2 => '兑现中',
 
- 	3 => '已完成',
 
- 	4 => '失败',
 
- );
 
- $cron = array
 
- (
 
- 	1 => '待机',
 
- 	2 => '完成',
 
- );
 
- return array
 
- (
 
- 	# 表名
 
- 	'name' => 'user_cash',
 
- 	# 显示给用户看的名称
 
- 	'lang' => '用户兑现',
 
- 	'menu' => 'passport',
 
- 	'order' => 98,
 
- 	# 数据结构
 
- 	'struct' => array
 
- 	(
 
- 		'id' 		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> 'ID',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '',
 
- 			'match' 	=> 'is_numeric',
 
- 			//'search'	=> 'order',
 
- 			'order'		=> 'desc',
 
- 			'list'		=> true,
 
- 		),
 
- 		'uid'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '用户名',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '用户名',
 
- 			'match' 	=> 'is_numeric',
 
- 			//'update'	=> 'text',
 
- 			'search'	=> array
 
- 			(
 
- 				'api' => 'passport/user-all',
 
- 				'col' => 'username',
 
- 				'result' => 'id',
 
- 			),
 
- 			'list'		=> 'Dever::load("passport/user-one#username", {uid})',
 
- 		),
 
- 		'score'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-11',
 
- 			'name' 		=> '兑现积分',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '兑现积分',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'text',
 
- 			'list_name'	=> '兑现信息',
 
- 			'list'		=> 'Dever::load("task/lib/manage.cash", {id})',
 
- 		),
 
- 		'cash'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-11',
 
- 			'name' 		=> '兑换金额',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '兑换金额',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'text',
 
- 		),
 
- 		'type'		=> array
 
- 		(
 
- 			'type' 		=> 'tinyint-1',
 
- 			'name' 		=> '兑现类型',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '兑现类型',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'select',
 
- 			'option'	=> $type,
 
- 			'search'	=> 'select',
 
- 			'list'		=> true,
 
- 			//'edit'		=> true,
 
- 		),
 
- 		'status'		=> array
 
- 		(
 
- 			'type' 		=> 'tinyint-1',
 
- 			'name' 		=> '审核状态',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '审核状态',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'select',
 
- 			'option'	=> $status,
 
- 			'search'	=> 'select',
 
- 			'list'		=> true,
 
- 		),
 
- 		'status_desc'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-300',
 
- 			'name' 		=> '审核说明',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '请输入审核说明',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'textarea',
 
- 			'show'		=> 'status=4',
 
- 		),
 
- 		'cron'		=> array
 
- 		(
 
- 			'type' 		=> 'tinyint-1',
 
- 			'name' 		=> '计划任务执行状态',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '计划任务执行状态',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'select',
 
- 			'option'	=> $cron,
 
- 		),
 
- 		'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,
 
- 			'search'	=> 'date',
 
- 			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
 
- 		),
 
- 	),
 
- 	# 更新表结构
 
- 	'alter' => array
 
- 	(
 
- 		1 => array
 
- 		(
 
- 			array('update', 'score', 'score', 'varchar-11 0 积分'),
 
- 			array('update', 'cash', 'cash', 'varchar-11 0 兑换金额'),
 
- 		),
 
- 		'version' => 1,
 
- 	),
 
- 	
 
- 	'manage' => array
 
- 	(
 
- 		'insert' => false,
 
- 		'edit' => false,
 
- 		'delete' => false,
 
- 		# 快捷更新
 
- 		'list_button' => array
 
- 		(
 
- 			'edit' => array('审核', 'status,status_desc', '{status} == 1'),
 
- 		),
 
- 	),
 
- );
 
 
  |