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

import com.fasterxml.jackson.annotation.JsonAlias;
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.time.LocalDate;

/**
 * MCP 用工组（对应 {@code fe_draft_work_item} / API {@code worker_groups[]}）。
 * <p>对外主键名：work_type / work_location / settlement_mode；兼容 job_type / region / settlement_cycle。</p>
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@Schema(description = "草稿用工组")
public class DraftWorkerGroupItem {

    @JsonProperty("group_id")
    @Schema(description = "组编号，须为 grp_01 / grp_02 格式；非标准值后端会忽略并按序生成")
    private String groupId;

    @JsonProperty("work_type")
    @JsonAlias({"job_type"})
    private String jobType;

    @JsonProperty("worker_count")
    private Integer workerCount;

    @JsonProperty("work_days")
    private BigDecimal workDays;

    /** API work_location / region → 表 work_location */
    @JsonProperty("work_location")
    @JsonAlias({"region"})
    private String region;

    @JsonProperty("settlement_mode")
    @JsonAlias({"settlement_cycle"})
    private String settlementCycle;

    @JsonProperty("unit_amount")
    private BigDecimal unitAmount;

    @JsonProperty("total_amount")
    private BigDecimal totalAmount;

    @JsonProperty("work_content")
    private String workContent;

    @JsonProperty("work_start_date")
    private LocalDate workStartDate;

    @JsonProperty("work_end_date")
    private LocalDate workEndDate;

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getJobType() {
        return jobType;
    }

    public void setJobType(String jobType) {
        this.jobType = jobType;
    }

    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 getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public String getSettlementCycle() {
        return settlementCycle;
    }

    public void setSettlementCycle(String settlementCycle) {
        this.settlementCycle = settlementCycle;
    }

    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 String getWorkContent() {
        return workContent;
    }

    public void setWorkContent(String workContent) {
        this.workContent = workContent;
    }

    public LocalDate getWorkStartDate() {
        return workStartDate;
    }

    public void setWorkStartDate(LocalDate workStartDate) {
        this.workStartDate = workStartDate;
    }

    public LocalDate getWorkEndDate() {
        return workEndDate;
    }

    public void setWorkEndDate(LocalDate workEndDate) {
        this.workEndDate = workEndDate;
    }
}
