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

import io.swagger.v3.oas.annotations.media.Schema;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * 更新用工草稿请求（仅传需修改的字段，pending 状态可编辑）。
 */
@Schema(description = "更新用工草稿请求")
public class DraftUpdateRequest {

    @Schema(description = "标题")
    @Size(max = 200, message = "标题不能超过 200 字")
    private String title;

    @Schema(description = "计划用工人数")
    @Min(value = 1, message = "用工人数至少为 1")
    private Integer workerCount;

    @Schema(description = "计划工作天数（支持小数，如 0.5）")
    @DecimalMin(value = "0.01", message = "工作天数须大于 0")
    private BigDecimal workDays;

    @Schema(description = "岗位/工种")
    @Size(max = 100, message = "岗位类型不能超过 100 字")
    private String workType;

    @Schema(description = "工作内容")
    private String workContent;

    @Schema(description = "工作地点")
    @Size(max = 500, message = "工作地点不能超过 500 字")
    private String workLocation;

    @Schema(description = "结算方式：daily / piece / monthly")
    private String settlementMode;

    @Schema(description = "日薪（元）")
    @DecimalMin(value = "0.01", message = "日薪必须大于 0")
    private BigDecimal dailyWage;

    @Schema(description = "是否购买保险")
    private Boolean insuranceRequired;

    @Schema(description = "保险档次：basic / standard / premium")
    private String insuranceLevel;

    @Schema(description = "是否要求打卡")
    private Boolean checkInRequired;

    @Schema(description = "登记二维码有效天数")
    @Min(value = 1, message = "二维码有效天数至少为 1")
    @Max(value = 90, message = "二维码有效天数不能超过 90")
    private Integer qrValidDays;

    @Schema(description = "计划开工日期")
    private LocalDate workStartDate;

    @Schema(description = "计划结束日期")
    private LocalDate workEndDate;

    @Schema(description = "岗位要求")
    private String jobRequirements;

    @Schema(description = "已选方案 ID")
    private Long selectedPlanId;

    public String getTitle() {
        return title;
    }

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

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

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

    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 getDailyWage() {
        return dailyWage;
    }

    public void setDailyWage(BigDecimal dailyWage) {
        this.dailyWage = dailyWage;
    }

    public Boolean getInsuranceRequired() {
        return insuranceRequired;
    }

    public void setInsuranceRequired(Boolean insuranceRequired) {
        this.insuranceRequired = insuranceRequired;
    }

    public String getInsuranceLevel() {
        return insuranceLevel;
    }

    public void setInsuranceLevel(String insuranceLevel) {
        this.insuranceLevel = insuranceLevel;
    }

    public Boolean getCheckInRequired() {
        return checkInRequired;
    }

    public void setCheckInRequired(Boolean checkInRequired) {
        this.checkInRequired = checkInRequired;
    }

    public Integer getQrValidDays() {
        return qrValidDays;
    }

    public void setQrValidDays(Integer qrValidDays) {
        this.qrValidDays = qrValidDays;
    }

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

    public String getJobRequirements() {
        return jobRequirements;
    }

    public void setJobRequirements(String jobRequirements) {
        this.jobRequirements = jobRequirements;
    }

    public Long getSelectedPlanId() {
        return selectedPlanId;
    }

    public void setSelectedPlanId(Long selectedPlanId) {
        this.selectedPlanId = selectedPlanId;
    }
}
