| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 | <?php$config = array(	# 表名	'name' => 'order',	# 显示给用户看的名称	'lang' => '商品订单',	'order' => 300,	'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'   => '0',            'desc'      => '请选择用户',            'match'     => 'is_numeric',            'update'    => 'text',            //'search'  => 'select',            'search'    => array            (                'api' => 'passport/user-all',                'col' => 'username',                'result' => 'id',            ),            'list'      => '{uid} > 0 ? Dever::load("passport/user-one#username", {uid}) : "匿名用户"',        ),		'info_id'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '商品ID',			'default' 	=> '',			'desc' 		=> '商品ID',			'match' 	=> 'is_numeric',			'update'	=> 'text',			'list'		=> true,		),		'order_id'		=> array		(			'type' 		=> 'varchar-100',			'name' 		=> '订单id',			'default' 	=> '',			'desc' 		=> '订单id',			'match' 	=> 'is_string',			'update'	=> 'text',			'list'		=> true,		),		'name'		=> array		(			'type' 		=> 'varchar-100',			'name' 		=> '商品名称',			'default' 	=> '',			'desc' 		=> '商品名称',			'match' 	=> 'is_string',			'update'	=> 'text',			'list'		=> true,		),		'cash'		=> array		(			'type' 		=> 'varchar-100',			'name' 		=> '价格',			'default' 	=> '',			'desc' 		=> '价格',			'match' 	=> 'is_string',			'update'	=> 'text',			'list'		=> true,		),		'num'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '数量',			'default' 	=> '',			'desc' 		=> '数量',			'match' 	=> 'is_string',			'update'	=> 'text',			'list'		=> true,		),		'source'		=> array		(			'type' 		=> 'varchar-100',			'name' 		=> '来源',			'default' 	=> '',			'desc' 		=> '来源',			'match' 	=> 'is_string',			'update'	=> 'text',			//'list'		=> true,		),		'status'		=> array		(			'type' 		=> 'tinyint-1',			'name' 		=> '订单状态',			'default' 	=> '1',			'desc' 		=> '订单状态',			'match' 	=> 'is_numeric',		),		'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,    ),    # request 请求接口定义	'request' => array	(			),);return $config;
 |