'支出', 2 => '收入', ); $cash = array ( 1 => '微信', 2 => '支付宝', ); $type = array ( 1 => '积分兑现', 2 => '任务奖励', 3 => '任务提成', 4 => '系统奖励', ); return array ( # 表名 'name' => 'user_score_log', # 显示给用户看的名称 'lang' => '用户积分日志', 'menu' => false, 'order' => 19, # 数据结构 '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})', ), 'num' => array ( 'type' => 'int-11', 'name' => '积分', 'default' => '', 'desc' => '积分', 'match' => 'is_numeric', 'update' => 'text', ), '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}) : "系统"', ), 'type' => array ( 'type' => 'tinyint-1', 'name' => '积分类型', 'default' => '1', 'desc' => '积分类型', 'match' => 'is_numeric', 'update' => 'select', 'option' => $type, 'search' => 'select', 'list' => true, 'edit' => true, ), 'cash' => array ( 'type' => 'tinyint-1', 'name' => '兑现途径', 'default' => '1', 'desc' => '兑现途径', 'match' => 'is_numeric', 'update' => 'select', 'option' => $cash, 'search' => 'select', 'list' => true, ), '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', ), 'cash_date' => array ( 'type' => 'int-11', 'name' => '申请兑现时间', 'default' => '', 'match' => 'is_numeric', 'desc' => '申请兑现时间', ), '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, ), );