<?php

declare(strict_types=1);

namespace App\Notifications;

use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;

class CommentReplied extends Notification
{
    use Queueable;

    public function __construct(public string $commentId, public string $postId, public string $replier)
    {
    }

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

    public function toDatabase(object $notifiable): array
    {
        return [
            'type' => 'comment_replied',
            'comment_id' => $this->commentId,
            'post_id' => $this->postId,
            'replier' => $this->replier,
            'message' => "내 댓글에 답글이 달렸습니다",
        ];
    }
}
