<?php

namespace App\Models;

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

class Staff extends Model
{
    use HasFactory;

    protected $table = 'staff';

    protected $fillable = [
        'guru_id',
        'nip',
        'nama',
        'jabatan',
        'gaji_pokok',
        'telepon',
        'alamat'
    ];

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

    public function penggajian()
    {
        return $this->hasMany(Penggajian::class);
    }
}