<?php

namespace Mtc\Shop\Assessment;

use Illuminate\Database\Eloquent\Model;

class AnswerMagento extends Model
{
    protected $table = 'assessment_answers_magento';


    public static function getQuestionText($question)
    {
        $question_text = $question;

        if (is_numeric($question)) {
            $q = Question::query()->where('magento_question_id', '=', $question)->first();
            if ($q) {
                $question_text = $q->question_text;
            }
        }

        return $question_text;
    }
}

