<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Relations\BelongsTo;

class PayrollStructureComponent extends BaseModel
{
    protected $fillable = [
        'payroll_structure_id',
        'salary_component_id',
        'calculation_type',
        'value',
    ];

    public function payrollStructure(): BelongsTo
    {
        return $this->belongsTo(PayrollStructure::class);
    }

    public function salaryComponent(): BelongsTo
    {
        return $this->belongsTo(SalaryComponent::class);
    }
}
