<?php

namespace App\Policies;

use App\Models\EventPaymentProof;
use App\Models\User;

class EventPaymentProofPolicy
{
    public function view(User $user, EventPaymentProof $proof): bool
    {
        return $user->isAdmin()
            || $proof->eventRegistration?->user_id === $user->id;
    }

    public function create(User $user): bool
    {
        return true;
    }
}
