<?php

namespace Portal\Mileage\Model;

use Illuminate\Database\Eloquent\Model;


class StaffInfo extends Model
{

    
    /**
     * The database table used by the model.
     *
     * @var string
     */
    protected $table = 'staff_info';
    protected $primaryKey = 'staff_id';
    public $timestamps = true;

    protected $fillable = [
        'staff_id',
        'fk_users',
        'fk_lkp_department',
        'status',
    ];


    /**
     * undocumented function
     *
     * @return void
     * @author 
     **/
    // public function lkpdepartment()
    // {
    //     return $this->belongsTo('Portal\Mileage\Model\Cuti\LkpDepartment','fk_lkp_department');
    // }

    /**
     * undocumented function
     *
     * @return void
     * @author 
     **/
    public function lpenyokong()
    {
    	return $this->belongsTo('Portal\Mileage\Model\Users','penyokong');
    }

    /**
     * undocumented function
     *
     * @return void
     * @author 
     **/
    public function lpelulus()
    {
    	return $this->belongsTo('Portal\Mileage\Model\Users','pelulus');
    }

    public function department()
    {
        return $this->belongsTo(\Portal\Mileage\Model\LkpDepartment::class, 'fk_lkp_department', 'id');
    }

    public function user()
    {
        return $this->belongsTo(\Portal\Mileage\Model\Users::class, 'fk_users', 'id');
    }

    


}
