'可用', 2 => '不可用', ); $type = array ( 1 => '未激活', 2 => '已激活', 3 => '不可用', ); return array ( # 表名 'name' => 'product', # 显示给用户看的名称 'lang' => '成品设备管理', # 后台菜单排序 'order' => 30, # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => '设备ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', 'search' => 'order', 'order' => 'desc', //'list' => true, ), 'info_id' => array ( 'type' => 'int-11', 'name' => '基础设备', 'default' => '1', 'desc' => '请选择基础设备', 'match' => 'is_numeric', 'option' => $info, 'update' => 'select', 'search' => 'select', 'list_name' => '设备名称', 'list' => '"{id}号" . Dever::load("device/info-one#name", {info_id})', ), 'key' => array ( 'type' => 'varchar-60', 'name' => '设备标识', 'default' => '', 'desc' => '设备标识', 'match' => 'is_string', //'update' => 'text', 'search' => 'fulltext', 'list' => true, ), 'api' => array ( 'type' => 'varchar-200', 'name' => '设备网关', 'default' => '', 'desc' => '设备网关', 'match' => 'is_string', 'update' => 'textarea', 'search' => 'fulltext', //'list' => true, ), 'ip' => array ( 'type' => 'varchar-200', 'name' => '设备IP或域名', 'default' => '', 'desc' => '设备IP或域名', 'match' => 'is_string', 'update' => 'textarea', 'search' => 'fulltext', 'list' => true, ), 'type' => array ( 'type' => 'tinyint-1', 'name' => '是否激活', 'default' => '1', 'desc' => '请选择是否激活', 'match' => 'is_numeric', 'option' => $type, 'update' => 'select', 'search' => 'select', 'list' => true, ), 'reorder' => array ( 'type' => 'int-11', 'name' => '排序-数值越大越靠前', 'default' => '1', 'desc' => '请输入排序', 'match' => 'option', 'update' => 'text', 'search' => 'order', 'list' => true, 'order' => 'desc', 'edit' => true, ), '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})', ), ), # request 请求接口定义 'request' => array ( ), );