<?php

namespace App\Modules\HR\Organization\Models;

use App\Modules\Admin\Tenancy\Traits\BelongsToTenant;
use Illuminate\Database\Eloquent\Model;

class JobGrade extends Model
{
    use BelongsToTenant;

    protected $table = 'hr_job_grades';

    protected $fillable = ['tenant_id', 'code', 'name', 'level', 'min_salary', 'max_salary', 'description', 'is_active'];

    protected function casts(): array
    {
        return ['is_active' => 'boolean', 'min_salary' => 'decimal:2', 'max_salary' => 'decimal:2'];
    }
}
