<?php

namespace Portal\Mileage\Model;

use Illuminate\Database\Eloquent\Model;

class LkpDepartment extends Model
{
    /**
     * The database table used by the model.
     *
     * @var string
     */
    protected $table = 'lkp_department';
    protected $primaryKey = 'id';
    public $timestamps = false;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'name',
        'code',
        'description'
    ];

    /**
     * Relationship to StaffInfo (one department has many staff)
     */
    public function staff()
    {
        return $this->hasMany(StaffInfo::class, 'fk_lkp_department', 'id');
    }
}
