package cn.nianxx.thhotel.platform.message.common.request;

import java.time.Instant;
import java.util.List;

/**
 * 平台来源消息捕获命令。业务层只依赖该稳定命令，不直接依赖 AgentBus 原始 DTO。
 */
public record CaptureSourceMessageCommand(
        String hotelId,
        String provider,
        String channel,
        String externalMessageId,
        String externalConversationId,
        String providerFrameId,
        String providerSessionId,
        Instant sourceReceivedAt,
        Instant sourceSentAt,
        String senderIdentifier,
        String subject,
        String textBody,
        String htmlBody,
        String payloadJson,
        String schemaVersion,
        List<CaptureSourceMessageMedia> mediaItems
) {
    public CaptureSourceMessageCommand(
            String hotelId,
            String provider,
            String channel,
            String externalMessageId,
            String externalConversationId,
            String providerFrameId,
            String providerSessionId,
            Instant sourceSentAt,
            String senderIdentifier,
            String subject,
            String textBody,
            String htmlBody,
            String payloadJson,
            String schemaVersion,
            List<CaptureSourceMessageMedia> mediaItems) {
        this(
                hotelId,
                provider,
                channel,
                externalMessageId,
                externalConversationId,
                providerFrameId,
                providerSessionId,
                null,
                sourceSentAt,
                senderIdentifier,
                subject,
                textBody,
                htmlBody,
                payloadJson,
                schemaVersion,
                mediaItems);
    }
}
