<?php

namespace LaraBB\Group\Tasks;

use LaraBB\Group\Models\Group;

/**
 * Class UpdateGroupTask
 * @package LaraBB\Group\Tasks
 */
class UpdateTask
{
    /**
     * @param Group $group
     * @param $data
     * @return bool
     */
    public function run(Group $group, $data): bool
    {
        $group->updated_uuid = $data['updated_uuid'];
        $group->group        = $data['group'];
        $group->color        = $data['color'];
        $group->priority     = $data['priority'];

        return $group->save();
    }
}
