<?php

namespace App\Classes\Modules\HelpMenu\Services;

use App\Classes\General\Eloquent\AbstractUpdateRecord;
use App\Classes\Modules\HelpMenu\DataTransferObjects\QAUserSourceObject;
use App\Models\QAUserSource;

class CreatesQAUserSource extends AbstractUpdateRecord
{
    /**
     * @param QAUserSourceObject $object
     * @return \Illuminate\Database\Eloquent\Model
     * @throws \App\Classes\Exceptions\MalformedRequestException
     */
    public function execute(QAUserSourceObject $object) {
        $model = new QAUserSource();
        $model->system = $object->getSystem();
        $model->marking = $object->getMarking();
        $model->email = $object->getEmail();

        return $this->handler($model);

    }
}
