<?php

namespace App\Models;

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

class EmployeeDeductionCalculator extends Model
{
    use HasFactory;

    protected $guarded = ['id'];

    /**This Tax Calculator was created by a Specific User**/
    public function user()
    {
        return $this->belongsTo(User::class, 'created_by', 'id');
    }

    /**Some Tax Calculator belongs to a Specific Deduction Table**/
    public function deduction(){
        return $this->belongsTo(EmployeeDeductionType::class, 'deduction_id');
    }
}
