| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 | 
							- <?php
 
- return array
 
- (
 
- 	# 表名
 
- 	'name' => 'sensor_log',
 
- 	# 显示给用户看的名称
 
- 	'lang' => '传感器日志',
 
- 	'menu'	=> false,
 
- 	'order' => 20,
 
- 	# 数据结构
 
- 	'struct' => array
 
- 	(
 
- 		'id' 		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> 'ID',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '',
 
- 			'match' 	=> 'is_numeric',
 
- 			//'search'	=> 'order',
 
- 			//'list'		=> true,
 
- 		),
 
- 		/*
 
- 		'id' 		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-50',
 
- 			'name' 		=> 'ID',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '',
 
- 			'match' 	=> 'is_string',
 
- 			'search'	=> 'order',
 
- 			'list'		=> true,
 
- 		),
 
- 		*/
 
- 		
 
- 		'product_id'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '成品设备',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '请输入设备ID',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'text',
 
- 		),
 
- 		'device_id'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '基础设备',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '请输入基础设备',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'text',
 
- 		),
 
- 		
 
- 		'sensor_id'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '传感器',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '传感器',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'text',
 
- 			//'list'		=> 'Dever::load("device/sensor-one#name", {sensor_id})',
 
- 		),
 
- 		
 
- 		'content'		=> array
 
- 		(
 
- 			'type' 		=> 'text-255',
 
- 			'name' 		=> '文本内容',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '文本内容',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'textarea',
 
- 			'search'	=> 'fulltext',
 
- 			'list'		=> true,
 
- 			//'modal'		=> '查看详情',
 
- 		),
 
- 		
 
- 		'source'		=> array
 
- 		(
 
- 			'type' 		=> 'text-255',
 
- 			'name' 		=> '原始内容',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '原始内容',
 
- 			'match' 	=> 'is_string',
 
- 			//'update'	=> 'textarea',
 
- 			//'search'	=> 'fulltext',
 
- 			//'list'		=> true,
 
- 			//'modal'		=> '查看详情',
 
- 		),
 
- 		'data'		=> array
 
- 		(
 
- 			'type' 		=> 'text-255',
 
- 			'name' 		=> '数据计算',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '请输入名称',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'textarea',
 
- 			'search'	=> 'fulltext',
 
- 			'list'		=> true,
 
- 			//'modal'		=> '查看详情',
 
- 		),
 
- 		
 
- 		'cdate'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '入库时间',
 
- 			'match' 	=> array('is_numeric', time()),
 
- 			'desc' 		=> '',
 
- 			# 只有insert时才生效
 
- 			'insert'	=> true,
 
- 			'search'	=> 'order',
 
- 			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
 
- 		),
 
- 	),
 
- 	
 
- 	'manage' => array
 
- 	(
 
- 		'insert' => false,
 
- 		'edit' => false,
 
- 	),
 
- 	
 
- 	# request 请求接口定义
 
- 	'request' => array
 
- 	(
 
- 		'getByCdate' => array
 
- 		(
 
- 			'option' => array
 
- 			(
 
- 				'code_id' => 'yes',
 
- 				'start' => array('yes-cdate', '>='),
 
- 				'end' => array('yes-cdate', '<='),
 
- 			),
 
- 			'type' => 'all',
 
- 			'order' => 'id',
 
- 			'col' => '*',
 
- 		),
 
- 	),
 
- );
 
 
  |