| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 | 
							- <?php
 
- $type = array
 
- (
 
- 	1 => '数值',
 
- 	2 => '百分比',
 
- );
 
- return array
 
- (
 
- 	# 表名
 
- 	'name' => 'freight',
 
- 	# 显示给用户看的名称
 
- 	'lang' => '运费设置',
 
- 	'order' => 1,
 
- 	# 数据结构
 
- 	'struct' => array
 
- 	(
 
- 		'id' 		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> 'ID',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '',
 
- 			'match' 	=> 'is_numeric',
 
- 			'search'	=> 'order',
 
- 			//'list'		=> true,
 
- 		),
 
- 		'category'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-500',
 
- 			'name' 		=> '分类',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '分类',
 
- 			'match' 	=> 'is_string',
 
- 			'search'	=> 'linkage',
 
- 			'update'	=> 'linkage',
 
- 			'option'	=> Dever::url('api.get', 'category'),
 
- 			'list'		=> 'Dever::load("category/api.string", "{category}")',
 
- 		),
 
- 		'area'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-500',
 
- 			'name' 		=> '地区',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '地区',
 
- 			'match' 	=> 'is_string',
 
- 			'search'	=> 'linkage',
 
- 			'update'	=> 'linkage',
 
- 			'option'	=> Dever::url('api.get', 'area'),
 
- 			'list'		=> 'Dever::load("area/api.string", "{area}")',
 
- 		),
 
- 		'type'		=> array
 
- 		(
 
- 			'type' 		=> 'tinyint-1',
 
- 			'name' 		=> '运费类型',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '运费类型',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'radio',
 
- 			'option'	=> $type,
 
- 			'list'		=> true,
 
- 			'search'	=> 'select',
 
- 		),
 
- 		
 
- 		'price'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '运费价格-如果是百分比类型,这里如果填的是10,那就是总价的10%',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '运费价格',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'text',
 
- 			'list'		=> true,
 
- 		),
 
- 		'free'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '总价满多少减免运费',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '满多少减免运费',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'text',
 
- 			//'list'		=> true,
 
- 		),
 
- 		'state'		=> array
 
- 		(
 
- 			'type' 		=> 'tinyint-1',
 
- 			'name' 		=> '状态',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '请选择状态',
 
- 			'match' 	=> 'is_numeric',
 
- 		),
 
- 		
 
- 		'cdate'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '录入时间',
 
- 			'match' 	=> array('is_numeric', DEVER_TIME),
 
- 			'desc' 		=> '',
 
- 			# 只有insert时才生效
 
- 			'insert'	=> true,
 
- 			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
 
- 		),
 
- 	),
 
- 	'manage' => array
 
- 	(
 
- 		//'delete' => false,
 
- 		//'edit' => false,
 
- 		//'insert' => false,
 
- 	),
 
- 	'request' => array
 
- 	(
 
- 		
 
- 	)
 
- );
 
 
  |