| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198 | 
							- <?php
 
- $type = Dever::config('base', 'pay')->pay['type'];
 
- $account = function()
 
- {
 
- 	return Dever::db('pay/account')->state();
 
- };
 
- $status = Dever::config('base', 'pay')->pay['status'];
 
- return array
 
- (
 
- 	# 表名
 
- 	'name' => 'order',
 
- 	# 显示给用户看的名称
 
- 	'lang' => '订单管理',
 
- 	'order' => 1,
 
- 	# 数据结构
 
- 	'struct' => array
 
- 	(
 
- 	
 
- 		'id' 		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> 'ID',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '',
 
- 			'match' 	=> 'is_numeric',
 
- 			'search'	=> 'order',
 
- 			//'list'		=> true,
 
- 		),
 
- 		'uid'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '用户',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '用户',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'text',
 
- 			/*
 
- 			'search'	=> array
 
- 			(
 
- 				'api' => 'passport/user-all',
 
- 				'col' => 'username',
 
- 				'result' => 'id',
 
- 			),
 
- 			'list'		=> 'Dever::load("passport/user-one#username", {uid})',
 
- 			*/
 
- 		),
 
- 		'username'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-200',
 
- 			'name' 		=> '用户名称',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '用户名称',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'search'	=> 'fulltext',
 
- 			'list'		=> true,
 
- 		),
 
- 		'name'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-200',
 
- 			'name' 		=> '订单名称',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '订单名称',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'search'	=> 'fulltext',
 
- 			'list'		=> true,
 
- 		),
 
- 		'order_id'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-100',
 
- 			'name' 		=> '订单id',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '订单id',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'text',
 
- 			'list'		=> true,
 
- 		),
 
- 		'type'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-30',
 
- 			'name' 		=> '支付类型',
 
- 			'default' 	=> 'wechat',
 
- 			'desc' 		=> '支付类型',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'radio',
 
- 			'option'	=> $type,
 
- 			'search'	=> 'select',
 
- 			'list'		=> true,
 
- 			'control'	=> 'type',
 
- 		),
 
- 		'product_id'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '产品id',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '产品id',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'text',
 
- 		),
 
- 		'account_id'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '支付账户',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '支付账户',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'select',
 
- 			'option'	=> $account,
 
- 			'search'	=> 'select',
 
- 			'list'		=> true,
 
- 		),
 
- 		'cash'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-11',
 
- 			'name' 		=> '金额',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '金额',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'list'		=> true,
 
- 		),
 
- 		'status'		=> array
 
- 		(
 
- 			'type' 		=> 'tinyint-1',
 
- 			'name' 		=> '支付状态',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '支付状态',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'radio',
 
- 			'option'	=> $status,
 
- 			'search'	=> 'select',
 
- 			'list'		=> true,
 
- 			'control'	=> 'status',
 
- 		),
 
- 		'status_desc'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-300',
 
- 			'name' 		=> '支付状态说明',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '请输入支付状态说明',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'textarea',
 
- 			'show'		=> 'status=3',
 
- 		),
 
- 		'param'		=> array
 
- 		(
 
- 			'type' 		=> 'text-255',
 
- 			'name' 		=> '支付信息-用于二次支付',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '支付信息',
 
- 			'match' 	=> 'option',
 
- 		),
 
- 		'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})',
 
- 		),
 
- 	),
 
- 	'manage' => array
 
- 	(
 
- 		'insert' => false,
 
- 		'edit' => false,
 
- 		'delete' => false,
 
- 	),
 
- );
 
 
  |