<?php

namespace App\Models;

use App\Models\ExamQuestion;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;

class ExamQuestionOption extends Model
{
    protected $fillable = [
        'exam_question_id',
        'option',
        'is_correct',
        'type',
        'file',
    ];
    public $timestamps = false;

    public function question()
    {
        return $this->belongsTo(ExamQuestion::class);
    }

    public function getCreatedAtAttribute($date)
    {
        return Carbon::parse($date)->format('Y-m-d h:i A');
    }
    
    public function getUpdatedAtAttribute($date)
    {
        return Carbon::parse($date)->format('Y-m-d h:i A');
    }
}
