<?php

namespace App\Classes\Jobs;

use App\Classes\Notifications\PaymentProofUploadedEmail;
use App\Models\Booking;
use App\Models\User;
use App\Models\File;
use App\Models\UserEmailVerification;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;

class SendUserPaymentProofUploadedEmail implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;


    /** @var User */
    private $user;

    /** @var Booking */
    private $booking;

    /** @var File */
    private $file;

    /**
     * SendUserVerificationEmail constructor.
     * @param User $user
     * @param UserEmailVerification $attempt
     */
    public function __construct(User $user, Booking $booking, File $file)
    {
        $this->user = $user;
        $this->booking = $booking;
        $this->file = $file;
    }


    public function handle()
    {
        $this->user->notify(new PaymentProofUploadedEmail($this->user, $this->booking, $this->file));
    }
}
