<?php

namespace App\Models;

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

class Psikiater extends Model
{
    use HasFactory;

    protected $table = 'penanganan_kasus_psikiaters';

    protected $primaryKey = 'id_psikiater';

    protected $fillable = [
        'tanggal',
        'diagnosis_awal',
        'penanganan',
        'resep_obat',
        'status',
        'id_siswa',
    ];

    public function siswa(): BelongsTo
    {
        return $this->belongsTo(Siswa::class, 'id_siswa', 'id_siswa');
    }
}
