'开启', 2 => '关闭', ); return array ( # 表名 'name' => 'link', # 显示给用户看的名称 'lang' => '友情链接', 'order' => 8, # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => '友情链接ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', 'search' => 'order', 'list' => true, ), 'name' => array ( 'type' => 'varchar-24', 'name' => '友情链接名称', 'default' => '', 'desc' => '请输入友情链接名称', 'match' => 'is_string', 'update' => 'text', 'search' => 'order,fulltext', 'list' => true, //'modal' => '点此打开', ), 'link' => array ( 'type' => 'varchar-100', 'name' => '链接', 'default' => '', 'desc' => '请输入链接', 'match' => 'is_string', 'update' => 'text', 'list' => true, ), 'pic' => array ( 'type' => 'varchar-150', 'name' => '图片-宽度为150的图片', 'default' => '', 'desc' => '请选择图片', 'match' => 'is_string', 'update' => 'image', 'key' => '1', 'place' => '150', ), 'info' => array ( 'type' => 'varchar-100', 'name' => '介绍', 'default' => '', 'desc' => '请输入介绍', 'match' => 'option', 'update' => 'textarea', ), 'state' => array ( 'type' => 'tinyint-1', 'name' => '状态', 'default' => '1', 'desc' => '请选择状态', 'match' => 'is_numeric', //'option' => $option, //'update' => 'radio', ), 'cdate' => array ( 'type' => 'int-11', 'name' => '录入时间', 'match' => array('is_numeric', time()), 'desc' => '', # 只有insert时才生效 'insert' => true, ), ), # 索引 'index' => array ( # 索引名 => 索引id ), # 管理功能 'manage' => array ( ), # request 请求接口定义 'request' => array ( # all 取所有链接 'getAll' => array ( 'where' => array ( 'state' => 1, ), 'type' => 'all', 'order' => array('id', 'desc'), 'limit' => array(10, 0), 'col' => '*', ), ), );