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

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

import java.math.BigDecimal;
import java.util.List;

/**
 * MCP 草稿更新 fields：支持扁平必填字段与多工种 worker_groups。
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@Schema(description = "草稿可更新字段")
public class McpDraftUpdateFields {

    @JsonProperty("worker_source")
    @Schema(description = "临时工来源：existing / recruit", example = "recruit")
    private String workerSource;

    @JsonProperty("worker_count")
    @Schema(description = "用工人数")
    private Integer workerCount;

    @JsonProperty("work_days")
    @Schema(description = "工作天数")
    private BigDecimal workDays;

    @JsonProperty("work_type")
    @Schema(description = "工种")
    private String workType;

    @JsonProperty("work_location")
    @Schema(description = "工作地点")
    private String workLocation;

    @JsonProperty("settlement_mode")
    @JsonAlias({"settlement_cycle"})
    @Schema(description = "结算方式：daily / weekly / monthly")
    private String settlementMode;

    @JsonProperty("unit_amount")
    @Schema(description = "单价（如日薪）")
    private BigDecimal unitAmount;

    @JsonProperty("total_amount")
    @Schema(description = "劳务费合计")
    private BigDecimal totalAmount;

    @JsonProperty("worker_groups")
    @Schema(description = "用工明细组（多工种整表替换）")
    private List<DraftWorkerGroupItem> workerGroups;

    @Schema(description = "草稿标题（可选）")
    private String title;

    public String getWorkerSource() {
        return workerSource;
    }

    public void setWorkerSource(String workerSource) {
        this.workerSource = workerSource;
    }

    public Integer getWorkerCount() {
        return workerCount;
    }

    public void setWorkerCount(Integer workerCount) {
        this.workerCount = workerCount;
    }

    public BigDecimal getWorkDays() {
        return workDays;
    }

    public void setWorkDays(BigDecimal workDays) {
        this.workDays = workDays;
    }

    public String getWorkType() {
        return workType;
    }

    public void setWorkType(String workType) {
        this.workType = workType;
    }

    public String getWorkLocation() {
        return workLocation;
    }

    public void setWorkLocation(String workLocation) {
        this.workLocation = workLocation;
    }

    public String getSettlementMode() {
        return settlementMode;
    }

    public void setSettlementMode(String settlementMode) {
        this.settlementMode = settlementMode;
    }

    public BigDecimal getUnitAmount() {
        return unitAmount;
    }

    public void setUnitAmount(BigDecimal unitAmount) {
        this.unitAmount = unitAmount;
    }

    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    public List<DraftWorkerGroupItem> getWorkerGroups() {
        return workerGroups;
    }

    public void setWorkerGroups(List<DraftWorkerGroupItem> workerGroups) {
        this.workerGroups = workerGroups;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
}
