<?php

namespace App\Models;

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

use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;

class Absensi extends Model
{
    use HasApiTokens, HasFactory, Notifiable;

    protected $fillable = [
        'santri_id', 'guru_id', 'kelas_id', 'tanggal', 'status', 'keterangan'
    ];

    public function santri()
    {
        return $this->belongsTo(\App\Models\Santri::class);
    }

    public function kelas()
    {
        return $this->belongsTo(\App\Models\Kelas::class);
    }

    public function guru()
    {
        return $this->belongsTo(\App\Models\Guru::class);
    }
}
