<?php

namespace App\Classes\Modules\Remarks\Services;

use App\Classes\General\Eloquent\AbstractUpdateRecord;
use App\Classes\Modules\Remarks\DataTransferObjects\RemarkObject;
use App\Models\Remark;

class UpdatesRemark extends AbstractUpdateRecord
{

    /**
     * @param Remark $model
     * @param RemarkObject $object
     * @return \Illuminate\Database\Eloquent\Model
     * @throws \App\Classes\Exceptions\MalformedRequestException
     */
    public function execute(Remark $model, RemarkObject $object) {

        $model->commenter_id = $object->getCommenterId();
        $model->content = $object->getContent();

        return $this->handler($model);

    }
}
