<?php

namespace App\Models;

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

class EmployeeAllowanceCalculator 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 Allowance Table**/
    public function allowance(){
        return $this->belongsTo(EmployeeAllowanceType::class, 'allowance_id');
    }
}
