<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class DemoExamOption extends Model
{
    protected $fillable = [
        'demo_exam_question_id',
        'option_key',
        'option_text',
        'is_correct',
    ];

    protected $casts = [
        'is_correct' => 'boolean',
    ];

    public function question()
    {
        return $this->belongsTo(DemoExamQuestion::class, 'demo_exam_question_id');
    }
}