<?php

namespace App\Modules\Procurement\Policies;

use App\Models\User;
use App\Modules\Procurement\Models\GoodsReceipt;

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

    public function view(User $user, GoodsReceipt $goodsReceipt): bool
    {
        return $user->can('procurement.goods_receipts.view', $goodsReceipt);
    }

    public function transition(User $user, GoodsReceipt $goodsReceipt): bool
    {
        return $user->can('procurement.goods_receipts.manage', $goodsReceipt);
    }
}
