'是', 2 => '否', ); return array ( # 表名 'name' => 'cart', # 显示给用户看的名称 'lang' => '购物车', # 后台菜单排序 'order' => 1, # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => 'ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', 'search' => 'order', //'list' => true, 'order' => 'desc', ), 'uid' => array ( 'type' => 'int-11', 'name' => '用户名', 'default' => '', 'desc' => '用户名', 'match' => 'is_numeric', 'update' => 'text', 'list' => 'Dever::load("passport/user-one#username", "{uid}")', ), 'product_id' => array ( 'type' => 'int-11', 'name' => '产品id', 'default' => '', 'desc' => '产品id', 'match' => 'is_numeric', 'update' => 'text', 'list' => 'Dever::load("product/info-one#name", "{product_id}")', ), 'num' => array ( 'type' => 'int-11', 'name' => '数量', 'default' => '', 'desc' => '数量', 'match' => 'is_numeric', 'update' => 'text', 'list' => true, ), 'state' => array ( 'type' => 'tinyint-1', 'name' => '状态', 'default' => '1', 'desc' => '请选择状态', 'match' => 'is_numeric', ), 'cdate' => array ( 'type' => 'int-11', 'name' => '录入时间', 'match' => array('is_numeric', time()), 'desc' => '', # 只有insert时才生效 'insert' => true, 'list' => 'date("Y-m-d H:i:s", {cdate})', ), ), 'manage' => array ( 'delete' => false, 'edit' => false, 'insert' => false, ), 'request' => array ( 'getAll' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'state' => 1, 'uid' => 'yes', ), 'type' => 'all', 'order' => array('cdate' => 'desc'), 'col' => '*', ), ), );