'正常', 2 => '异常', ); return array ( # 表名 'name' => 'user_task', # 显示给用户看的名称 'lang' => '用户任务', 'menu' => 'passport', 'order' => 100, # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => 'ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', //'search' => 'order', 'order' => 'desc', 'list' => true, ), 'uid' => array ( 'type' => 'int-11', 'name' => '用户名', 'default' => '', 'desc' => '用户名', 'match' => 'is_numeric', //'update' => 'text', 'search' => array ( 'api' => 'passport/user-all', 'col' => 'username', 'result' => 'id', ), 'list' => 'Dever::load("passport/user-one#username", {uid})', ), 'task_id' => array ( 'type' => 'int-11', 'name' => '任务名', 'default' => '-1', 'desc' => '任务名', 'match' => 'is_numeric', //'update' => 'select', 'search' => array ( 'api' => 'task/info-all', 'col' => 'name', 'result' => 'id', ), 'list' => '{task_id} > 0 ? Dever::load("task/info-one#name", {task_id}) : "系统"', ), 'status' => array ( 'type' => 'tinyint-1', 'name' => '审核状态', 'default' => '1', 'desc' => '审核状态', 'match' => 'is_numeric', 'update' => 'select', 'option' => $status, 'search' => 'select', 'list' => true, 'edit' => 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, 'search' => 'date', 'list' => 'date("Y-m-d H:i:s", {cdate})', ), ), 'manage' => array ( 'insert' => false, 'edit' => false, 'delete' => false, ), );