<?php

namespace Kylin\Notification\Channels;

use Kylin\Notification\Contracts\ChannelInterface;
use Kylin\Notification\Models\Notification;

class DatabaseChannel implements ChannelInterface
{
    public function send(Notification $notification, array $params = []): array
    {
        // 站内信已在 NotificationService::send() 中创建记录
        // 此处仅标记为成功
        return [
            'success' => true,
            'message_id' => (string) $notification->id,
            'error' => null,
            'raw_response' => null,
        ];
    }

    public function getName(): string
    {
        return 'database';
    }
}
