<?php

namespace App\Models;

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

class Psikolog extends Model
{
    use HasFactory;

    protected $table = 'penanganan_kasus_psikologs';

    protected $primaryKey = 'id_psikolog';

    protected $fillable = [
        'tanggal',
        'kesimpulan_sementara',
        'penanganan',
        'rekomendasi_lanjut',
        'status',
        'id_siswa',
    ];

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