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

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

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Schema(description = "MCP 更新草稿请求（交互规则 v4 §6.4.2）")
public class McpDraftUpdateRequest {

    @JsonProperty("user_id")
    @Schema(description = "用户 ID（可选）")
    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;

    @NotNull(message = "draft_id 不能为空")
    @JsonProperty("draft_id")
    @Schema(description = "草稿 ID（generate 返回）", example = "1", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long draftId;

    @Valid
    @NotNull(message = "fields 不能为空")
    @Schema(description = "待更新字段（含 worker_source / worker_groups 等）",
            requiredMode = Schema.RequiredMode.REQUIRED)
    private McpDraftUpdateFields fields;

    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 Long getDraftId() {
        return draftId;
    }

    public void setDraftId(Long draftId) {
        this.draftId = draftId;
    }

    public McpDraftUpdateFields getFields() {
        return fields;
    }

    public void setFields(McpDraftUpdateFields fields) {
        this.fields = fields;
    }
}
