<?php

namespace App\Models;

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

class Sajdah extends Model
{
    use HasFactory;

    protected $fillable = [
        'surah_id',
        'ayat_id',
        'ayah_number',
        'number_in_surah',
        'arabic_text',
        'recommended',
        'obligatory',
        'juz',
        'manzil',
        'page',
        'ruku',
        'hizb_quarter',
    ];

    protected $casts = [
        'recommended' => 'boolean',
        'obligatory' => 'boolean',
    ];

    // Relationship to Surah
    public function surah()
    {
        return $this->belongsTo(Surah::class);
    }

    // Relationship to Ayat
    public function ayat()
    {
        return $this->belongsTo(Ayat::class);
    }
}
