<?php

namespace Modules\HR\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Modules\Core\Traits\HasStatus;
use Modules\HR\Models\Traits\HasSalaryComponent;
use Modules\HR\Models\Traits\HasSalaryStructure;

// use Modules\HR\Database\Factories\SalaryStructureItemFactory;

class SalaryStructureItem extends Model
{
    use  HasSalaryComponent,HasSalaryStructure,HasStatus,HasFactory;

    /**
     * The attributes that are mass assignable.
     */
    protected $fillable = ['salary_structure_id', 'salary_component_id', 'use_default_rule','calculation_value', 'calculation_type','formula', 'calculation_basis','is_basic', 'status'];


    protected $casts = [
        'use_default_rule' => 'boolean',
        'is_basic' => 'boolean'
    ];

    // protected static function newFactory(): SalaryStructureItemFactory
    // {
    //     // return SalaryStructureItemFactory::new();
    // }
}
