<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class QuestionBank extends Model { protected $table='question_bank'; protected $fillable=['question_topic_id','code','question_text','difficulty','default_score','explanation','status']; public function topic(){ return $this->belongsTo(QuestionTopic::class,'question_topic_id'); } public function options(){ return $this->hasMany(QuestionBankOption::class)->orderBy('sort_order'); } }
