'显示', 2 => '不显示', ); return array ( # 表名 'name' => 'device_control', # 显示给用户看的名称 'lang' => '设备状态', 'menu' => false, # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => 'ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', 'search' => 'order', 'order' => 'desc', //'list' => true, ), '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})', ), '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 ( ), );