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

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

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Map;

@Schema(description = "MCP 更新草稿请求")
public class McpDraftUpdateRequest {

    @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;

    @Schema(description = "待更新字段（snake_case 键名）", requiredMode = Schema.RequiredMode.REQUIRED,
            example = "{\"worker_count\": 10, \"total_amount\": 3000}")
    @NotEmpty(message = "fields 不能为空")
    private Map<String, Object> fields;

    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 Map<String, Object> getFields() {
        return fields;
    }

    public void setFields(Map<String, Object> fields) {
        this.fields = fields;
    }
}
