package com.huimv.employment.service.draft.dto;

import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;

import javax.validation.constraints.NotBlank;

@Schema(description = "MCP 生成初始草稿请求（交互规则 v4 §6.4.1）")
public class McpDraftGenerateRequest {

    @JsonProperty("user_id")
    @Schema(description = "用户 ID（可选，便于 Agent 透传；以会话归属为准）")
    private String userId;

    @NotBlank(message = "session_id 不能为空")
    @JsonProperty("session_id")
    @Schema(description = "会话标识，与 AI chat session_id / conversation_no 一致",
            example = "a1b2c3d4e5f6", requiredMode = Schema.RequiredMode.REQUIRED)
    private String sessionId;

    @NotBlank(message = "source_type 不能为空")
    @JsonProperty("source_type")
    @JsonAlias({"sourceType"})
    @Schema(description = "来源类型：intent / clone / button", example = "intent",
            requiredMode = Schema.RequiredMode.REQUIRED)
    private String sourceType;

    @JsonProperty("intent_text")
    @JsonAlias({"intentText"})
    @Schema(description = "用户意图文本（source_type=intent 时使用）", example = "我有一批临时工要发工资")
    private String intentText;

    @JsonProperty("history_order_id")
    @JsonAlias({"historyOrderId"})
    @Schema(description = "历史订单 ID（source_type=clone 时使用）")
    private String historyOrderId;

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getSessionId() {
        return sessionId;
    }

    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }

    public String getSourceType() {
        return sourceType;
    }

    public void setSourceType(String sourceType) {
        this.sourceType = sourceType;
    }

    public String getIntentText() {
        return intentText;
    }

    public void setIntentText(String intentText) {
        this.intentText = intentText;
    }

    public String getHistoryOrderId() {
        return historyOrderId;
    }

    public void setHistoryOrderId(String historyOrderId) {
        this.historyOrderId = historyOrderId;
    }
}
