<?php

namespace App\Models;

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

class Siswa extends Model
{
    use HasFactory;

    protected $table = 'siswa';
    protected $primaryKey = 'nis';
    public $timestamps = false;

    protected $fillable = [
        'nama_siswa',
        'kelas',
        'jk',
        'alamat',
        'foto',
        'id_profil'
    ];

    /**
     * Get the profile associated with the student.
     */
    public function profil()
    {
        return $this->belongsTo(ProfilJurusan::class, 'id_profil', 'id_profil');
    }
}
