<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class QuestionMeta extends Model
{
    use HasFactory;

    protected $table = 'question_meta';

    protected $fillable = [
        'question_id',
        'abilities',
        'generation_info',
        'review_status',
    ];

    protected $casts = [
        'abilities' => 'array',
        'generation_info' => 'array',
        'created_at' => 'datetime',
        'updated_at' => 'datetime',
    ];

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