<?php

namespace App\Modules\HR\Shifts\Policies;

use App\Models\User;
use App\Modules\HR\Shifts\Models\Shift;

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

    public function view(User $user, Shift $shift): bool
    {
        return $user->can('shifts.view', $shift);
    }

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

    public function update(User $user, Shift $shift): bool
    {
        return $user->can('shifts.update', $shift);
    }

    public function deactivate(User $user, Shift $shift): bool
    {
        return $user->can('shifts.deactivate', $shift);
    }
}
