<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class PastQuestion extends Model
{
    protected $fillable = [
        'course_id',
        'year',
        'batch',
        'title',
        'description',
        'is_premium',
        'is_active',
    ];

    protected $casts = [
        'year' => 'integer',
        'is_premium' => 'boolean',
        'is_active' => 'boolean',
    ];

    public function course()
    {
        return $this->belongsTo(Course::class);
    }

    public function questions()
    {
        return $this->hasMany(PastQuestionQuestion::class);
    }
}