<?php

namespace App\Models;

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

class Employee extends Model
{
    use HasFactory;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'employee_code',
        'employee_name',
        'category_employee',
        'gender',
        'phone',
        'address',
        'ktp',
        'npwp',
        'nomor_bon',
        'department_id',
        'position_id',
        'account_employee_debt',
        'created_by',
        'updated_by',
    ];

    public function debts()
    {
        return $this->hasMany(EmployeeDebt::class, 'employee_id','id');
    }
}
