<?php

declare(strict_types=1);

namespace App\Amqp\Producer;

use Hyperf\Amqp\Annotation\Producer;
use Hyperf\Amqp\Message\ProducerDelayedMessageTrait;
use Hyperf\Amqp\Message\ProducerMessage;
use Hyperf\Amqp\Message\Type;

/**
 * 取消未支付药品/问诊订单
 * 延迟队列
 */
#[Producer]
class CancelUnpayOrdersDelayDirectProducer extends ProducerMessage
{
    use ProducerDelayedMessageTrait;

    protected string $exchange = 'amqp.delay.direct';

    protected string $type = Type::DIRECT;

    protected string|array $routingKey = 'CancelUnpayOrders';

    public function __construct($data)
    {
        $this->payload = $data;
    }
}
