public static function updateAll($attributes, $condition = '', $params = [], $connection = null)
    {
        $command = static::getDb()->createCommand();
        $command->update(static::tableName(), $attributes, $condition, $params);
        if (isset($connection)) {
            $command->setConnection($connection);
        }

        return $command->execute();
    }