<?php
namespace App\Policies;

use App\Models\Merchant;
use Illuminate\Database\Eloquent\Model;

final class TenantPolicy
{
    public function view(Merchant $merchant, Model $resource): bool
    {
        return (string) $resource->getAttribute('merchant_id') === (string) $merchant->getKey();
    }
    public function update(Merchant $merchant, Model $resource): bool { return $this->view($merchant, $resource); }
    public function delete(Merchant $merchant, Model $resource): bool { return $this->view($merchant, $resource); }
}
