| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231 | 
							- <?php
 
- $status = array
 
- (
 
- 	1 => '支出',
 
- 	2 => '收入',
 
- );
 
- $cash_type = array
 
- (
 
- 	1 => '微信',
 
- 	2 => '支付宝',
 
- );
 
- //后台只显示
 
- $type = array
 
- (
 
- 	//1 => '积分兑现-申请',
 
- 	//2 => '积分兑现-完成',
 
- 	//3 => '积分兑现-失败',
 
- 	4 => '任务奖励',
 
- 	5 => '任务提成',
 
- 	//6 => '系统奖励',
 
- );
 
- return array
 
- (
 
- 	# 表名
 
- 	'name' => 'user_score_log',
 
- 	# 显示给用户看的名称
 
- 	'lang' => '用户积分日志',
 
- 	'menu' => false,
 
- 	'order' => 19,
 
- 	# 数据结构
 
- 	'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})',
 
- 		),
 
- 		'group_uid'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '下线用户名',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '下线用户名',
 
- 			'match' 	=> 'is_numeric',
 
- 		),
 
- 		'score'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '积分',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '积分',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'text',
 
- 			'list'		=> true,
 
- 		),
 
- 		'cash'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '兑换现金',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '兑换现金',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'text',
 
- 		),
 
- 		'task_id'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '任务名',
 
- 			'default' 	=> '-1',
 
- 			'desc' 		=> '任务名',
 
- 			'match' 	=> 'is_numeric',
 
- 			//'update'	=> 'select',
 
- 			'search'	=> array
 
- 			(
 
- 				'api' => 'task/info-all',
 
- 				'col' => 'name',
 
- 				'result' => 'id',
 
- 			),
 
- 			'list'		=> '{task_id} > 0 ? Dever::load("task/info-one#name", {task_id}) : "系统"',
 
- 		),
 
- 		'report_id'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '报告',
 
- 			'default' 	=> '-1',
 
- 			'desc' 		=> '报告',
 
- 			'match' 	=> 'is_numeric',
 
- 		),
 
- 		'type'		=> array
 
- 		(
 
- 			'type' 		=> 'tinyint-1',
 
- 			'name' 		=> '积分类型',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '积分类型',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'select',
 
- 			'option'	=> $type,
 
- 			'search'	=> 'select',
 
- 			'list'		=> true,
 
- 			//'edit'		=> true,
 
- 		),
 
- 		'type_desc'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-300',
 
- 			'name' 		=> '积分类型描述',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '请输入积分类型描述',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'textarea',
 
- 		),
 
- 		'cash_type'		=> array
 
- 		(
 
- 			'type' 		=> 'tinyint-1',
 
- 			'name' 		=> '兑现途径',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '兑现途径',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'select',
 
- 			//'option'	=> $cash_type,
 
- 			//'search'	=> 'select',
 
- 			//'list'		=> true,
 
- 		),
 
- 		'status'		=> array
 
- 		(
 
- 			'type' 		=> 'tinyint-1',
 
- 			'name' 		=> '收入支出状态',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '收入支出状态',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'select',
 
- 			'option'	=> $status,
 
- 			//'search'	=> 'select',
 
- 			'list'		=> true,
 
- 			//'edit'		=> true,
 
- 		),
 
- 		'state'		=> array
 
- 		(
 
- 			'type' 		=> 'tinyint-1',
 
- 			'name' 		=> '状态',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '请选择状态',
 
- 			'match' 	=> 'is_numeric',
 
- 		),
 
- 		'cash_date'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '申请兑现时间',
 
- 			'default' 	=> '',
 
- 			'match' 	=> 'is_numeric',
 
- 			'desc' 		=> '申请兑现时间',
 
- 		),
 
- 		
 
- 		'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
 
- 	(
 
- 		'insert' => false,
 
- 		'edit' => false,
 
- 		'delete' => false,
 
- 	),
 
- 	'request' => array
 
- 	(
 
- 		'getAll' => array
 
- 		(
 
- 			# 匹配的正则或函数 选填项
 
- 			'option' => array
 
- 			(
 
- 				'uid' => 'yes',
 
- 				'task_id' => 'yes',
 
- 				'report_id' => 'yes',
 
- 				'status' => 'yes',
 
- 				'type' => 'yes',
 
- 				'state' => 1,
 
- 			),
 
- 			'type' => 'all',
 
- 			'order' => array('cdate' => 'desc'),
 
- 			'col' => '*',
 
- 		),
 
- 	)
 
- );
 
 
  |