<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasOne;

class Deduction extends Model
{
    use HasFactory;


    protected $fillable = [
        "name",
        "org_id",
        "type",
        "status",
        "is_exceptional",
        "start_date",
        "end_date",
        "slug",
        "is_taxable"
    ];

    //Define Parents Relationships
    public function employeeDeduction()
    {
        return $this->hasMany(EmployeeDeduction::class);
    }
    //Define Child Relationships
    public function organisation()
    {
        return $this->belongsTo(Organisation::class);
    }
}
