<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class LeaveRequest extends Model
{
    protected $fillable = [
        'employee_id', 'leave_type', 'start_date', 'end_date', 'reason', 'status', 'action_by', 'remarks', 'is_lop', 'is_half_day', 'half_day_session'
    ];

    public function employee()
    {
        return $this->belongsTo(Employee::class);
    }

    public function actionBy()
    {
        return $this->belongsTo(Employee::class, 'action_by');
    }
}
