'integer', 'account_id' => 'integer', 'status' => 'integer', 'account_type' => 'integer', 'belong_id' => 'integer']; public static function list(array $param) { $model = self::query(); if (isset($param['account_id']) && $param['account_id'] != '') { $model = $model->where('account_id', $param['account_id']); } if (isset($param['name']) && $param['name'] != '') { $model = $model->where('name', "like", "%{$param['name']}%"); } if (isset($param['module']) && $param['module'] != '') { $model = $model->where('module', $param['module']); } if (isset($param['type']) && $param['type'] != '') { $model = $model->where('type', $param['type']); } if (isset($param['status']) && $param['status'] != '') { $model = $model->where('status', $param['status']); } return $model->orderByDesc("attachment_id") ->select(["attachment_id", "name", "type", "path", "status", "fail_reason", "create_time"]) ->paginate((int)$param['limit']); } }