'显示', 2 => '不显示', ); $status = array ( 1 => '未执行', 2 => '已执行-已发送给客户端', 3 => '完成执行-客户端发出响应', ); return array ( # 表名 'name' => 'product_control', # 显示给用户看的名称 'lang' => '设备状态', 'menu' => false, # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => 'ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', 'search' => 'order', 'order' => 'desc', //'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', ), 'control_id' => array ( 'type' => 'int-11', 'name' => '控制器', 'default' => '', 'desc' => '控制器', 'match' => 'is_numeric', 'update' => 'text', //'list' => 'Dever::load("device/sensor-one#name", {sensor_id})', ), 'name' => array ( 'type' => 'varchar-80', 'name' => '名称', 'default' => '', 'desc' => '名称', 'match' => 'is_string', 'update' => 'text', 'list' => true, ), 'value' => array ( 'type' => 'varchar-500', 'name' => '当前的值', 'default' => '', 'desc' => '当前的值', 'match' => 'is_string', 'update' => 'text', 'search' => 'fulltext', //'list' => '{reorder} == 10000 ? Dever::mdate("{value}") : "{value}{dw}"', 'list' => true, ), 'send' => array ( 'type' => 'varchar-500', 'name' => '发送的数据', 'default' => '', 'desc' => '发送的数据', 'match' => 'is_string', 'update' => 'textarea', //'list' => true, ), 'receive' => array ( 'type' => 'varchar-500', 'name' => '接收到的数据', 'default' => '', 'desc' => '接收到的数据', 'match' => 'is_string', 'update' => 'text', 'list' => true, ), 'status' => array ( 'type' => 'tinyint-1', 'name' => '运行状态', 'default' => '1', 'desc' => '请选择状态', 'match' => 'is_numeric', 'option' => $status, //'update' => 'radio', ), 'state' => array ( 'type' => 'tinyint-1', 'name' => '状态', 'default' => '1', 'desc' => '请选择状态', 'match' => 'is_numeric', 'option' => $option, 'update' => 'radio', //'list' => true, ), 'cdate' => array ( 'type' => 'int-11', 'name' => '录入时间', 'match' => array('is_numeric', time()), 'desc' => '', # 只有insert时才生效 'insert' => true, //'list' => 'date("Y-m-d H:i:s", {cdate})', ), ), //'auth' => 'company', 'manage' => array ( 'list_button' => array ( //11 => array('控制设备', '"farm_device_set&option_farm_device_id={id}"'), //12 => array('数据记录', '"farm_device_data&option_farm_device_id={id}"'), //6 => '删除' ), ), # request 请求接口定义 'request' => array ( ), );