<?php
namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
use Illuminate\Database\Eloquent\SoftDeletes;
class Leave  extends Model

{
    use HasApiTokens, HasFactory, Notifiable;

    /**
     * The attributes that are mass assignable.
     *
     * @var array<int, string>
     */
    use HasFactory;
    use SoftDeletes;
   
    protected $fillable = [
        'client_id', 'employee_id', 'leave_type_id', 'from_date', 'to_date', 'total_days', 'reason', 'attachment', 'status', 'approved_by', 
    ];

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

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