<?php

namespace App\Modules\HR\Positions\Policies;

use App\Models\User;
use App\Modules\HR\Positions\Models\Position;

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

    public function view(User $user, Position $position): bool
    {
        return $user->can('positions.view', $position);
    }

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

    public function update(User $user, Position $position): bool
    {
        return $user->can('positions.update', $position);
    }

    public function deactivate(User $user, Position $position): bool
    {
        return $user->can('positions.deactivate', $position);
    }
}
