<?php

namespace App\Modules\HR\Payroll\Policies;

use App\Models\User;
use App\Modules\HR\Payroll\Models\SalaryStructure;

class SalaryStructurePolicy
{
    public function viewAny(User $user): bool
    {
        return $user->can('salary_structures.view');
    }

    public function view(User $user, SalaryStructure $structure): bool
    {
        return $user->can('salary_structures.view');
    }

    public function create(User $user): bool
    {
        return $user->can('salary_structures.create');
    }

    public function update(User $user, SalaryStructure $structure): bool
    {
        return $user->can('salary_structures.update');
    }

    public function deactivate(User $user, SalaryStructure $structure): bool
    {
        return $user->can('salary_structures.deactivate');
    }
}
