<?php

namespace Kylin\Notification\Contracts;

use Kylin\Notification\Models\Notification;

interface ChannelInterface
{
    /**
     * 发送通知
     *
     * @param Notification $notification 通知记录
     * @param array $params 渠道特定参数
     * @return array ['success' => bool, 'message_id' => ?string, 'error' => ?string, 'raw_response' => mixed]
     */
    public function send(Notification $notification, array $params = []): array;

    /**
     * 获取渠道名称
     */
    public function getName(): string;
}
