<?php

namespace App\Models;

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

class Package extends Model
{
    use HasFactory;

    /**
     * The attributes that aren't mass assignable.
     *
     * @var array
     */
    protected $guarded = [];

    /**
     * تعريف العلاقة: كل باقة قد تفتح فئة أسئلة واحدة.
     */
    public function questionCategory()
    {
        return $this->belongsTo(QuestionCategory::class, 'unlocks_question_category_id');
    }
}