<?php

namespace App\Notifications;

use App\Models\JobApplication;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;

class CvInfectedNotification extends Notification
{
    use Queueable;

    public function __construct(
        protected JobApplication $application,
        protected string $message
    ) {}

    public function via(object $notifiable): array
    {
        return ['database'];
    }

    public function toArray(object $notifiable): array
    {
        return [
            'type'           => 'cv_infected',
            'title'          => '⚠ CV Virüs Tespit Edildi',
            'message'        => $this->message,
            'application_id' => $this->application->id,
            'applicant_name' => $this->application->full_name,
            'url'            => '/admin/basvurular/' . $this->application->id,
        ];
    }
}