<?php

namespace App\Models;

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

class Hadees extends Model
{
    use HasFactory;

    protected $fillable = [
        'hadith_category_id',
        'topic',
        'topic_arabic',
        'narrator',
        'arabic_text',
        'english_translation',
        'source',
        'grade',
    ];

    // Relationship to HadithCategory
    public function category()
    {
        return $this->belongsTo(HadithCategory::class, 'hadith_category_id');
    }
}
