<?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 CancelUnInquiryOrdersDelayDirectProducer extends ProducerMessage
{
    use ProducerDelayedMessageTrait;

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

    protected string $type = Type::DIRECT;

    protected string|array $routingKey = 'CancelUnInquiryOrders';

    /**
     * @param $data
     * [
     *      "order_inquiry_id":"问诊订单id"
     * ]
     */
    public function __construct($data)
    {
        $this->payload = $data;
    }
}
