<?php

namespace Modules\User\Repositories;

;
use Modules\User\Interfaces\VerificationRepositoryInterface;
use Modules\User\Models\Verification;

class VerificationRepository implements VerificationRepositoryInterface
{
    public function get(array $request)
    {
        $builder = Verification::query();
        return $builder;
    }

    public function getItem(int $id)
    {
        return Verification::find($id);
    }

    public function checkItem(int $id)
    {
        return Verification::find($id);
    }

    public function create(array $request): Verification
    {
        $verification = Verification::create($request);
        return $verification;
    }

    public function update(array $request, Verification $verification): Verification
    {
        $verification->update($request);

        return $verification;
    }

    /**
     * Remove the specified verification from storage.
     * @param Verification $verification
     * @return void
     */
    public function destroy(Verification $verification): void
    {
        $verification->delete();
    }
}
