state(); if ($info) { $array += $info; } return $array; }; return array ( # 表名 'name' => 'user_project', # 显示给用户看的名称 'lang' => '用户与项目关联表', 'order' => 10, 'menu' => false, # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => '用户ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', 'search' => 'order,fulltext', 'list' => true, ), 'uid' => array ( 'type' => 'int-11', 'name' => '用户名', 'default' => '0', 'desc' => '请选择用户', 'match' => 'is_numeric', 'update' => 'text', //'search' => 'select', 'search' => array ( 'api' => 'user/info-like', 'col' => 'search', 'result' => 'id', ), 'list' => 'Dever::load("user/lib/info.get#name", {uid})', ), 'project_id' => array ( 'type' => 'int-11', 'name' => '所属项目', 'default' => '1', 'desc' => '所属项目', 'match' => 'is_numeric', 'option' => $project, //'update' => 'select', //'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})', ), ), );