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

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;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 用工草稿详情。
 */
@Schema(description = "用工草稿详情")
public class DraftDetailResponse {

    @Schema(description = "草稿主键 ID", example = "1")
    private Long id;

    @Schema(description = "草稿业务编号", example = "draft_001")
    private String draftNo;

    @Schema(description = "所属企业 ID")
    private Long enterpriseId;

    @Schema(description = "发起用户 ID")
    private Long userId;

    @Schema(description = "来源会话 ID")
    private Long conversationId;

    @Schema(description = "场景：existing_worker_regularization / new_demand")
    private String scenario;

    @Schema(description = "标题")
    private String title;

    @Schema(description = "状态：pending / confirmed / cancelled / expired")
    private String status;

    @Schema(description = "计划用工人数")
    private Integer workerCount;

    @Schema(description = "计划工作天数")
    private Integer workDays;

    @Schema(description = "岗位/工种")
    private String workType;

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

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

    @Schema(description = "工作地点来源")
    private String workLocationSource;

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

    @Schema(description = "日薪（元）")
    private BigDecimal dailyWage;

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

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

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

    @Schema(description = "登记二维码有效天数")
    private Integer qrValidDays;

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

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

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

    @Schema(description = "待补充字段名列表")
    private List<String> missingFields;

    @Schema(description = "风险提示")
    private List<String> riskPrompts;

    @Schema(description = "预估总支出（元）")
    private BigDecimal estimatedTotal;

    @Schema(description = "预估人均成本（元）")
    private BigDecimal estimatedPerCapita;

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

    @Schema(description = "登记小程序码图片 URL（确认方案后由 fe_registration_batch 带回；未确认时为 null）")
    private String qrCodeUrl;

    @Schema(description = "登记扫码 token（fe_registration_batch.qr_token，与小程序码 scene 一致；未确认时为 null）")
    private String qrToken;

    @Schema(description = "字段级明细（来源、可编辑性）")
    private List<DraftFieldResponse> fields;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDraftNo() {
        return draftNo;
    }

    public void setDraftNo(String draftNo) {
        this.draftNo = draftNo;
    }

    public Long getEnterpriseId() {
        return enterpriseId;
    }

    public void setEnterpriseId(Long enterpriseId) {
        this.enterpriseId = enterpriseId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getConversationId() {
        return conversationId;
    }

    public void setConversationId(Long conversationId) {
        this.conversationId = conversationId;
    }

    public String getScenario() {
        return scenario;
    }

    public void setScenario(String scenario) {
        this.scenario = scenario;
    }

    public String getTitle() {
        return title;
    }

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

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getWorkerCount() {
        return workerCount;
    }

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

    public Integer getWorkDays() {
        return workDays;
    }

    public void setWorkDays(Integer 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 getWorkLocationSource() {
        return workLocationSource;
    }

    public void setWorkLocationSource(String workLocationSource) {
        this.workLocationSource = workLocationSource;
    }

    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 List<String> getMissingFields() {
        return missingFields;
    }

    public void setMissingFields(List<String> missingFields) {
        this.missingFields = missingFields;
    }

    public List<String> getRiskPrompts() {
        return riskPrompts;
    }

    public void setRiskPrompts(List<String> riskPrompts) {
        this.riskPrompts = riskPrompts;
    }

    public BigDecimal getEstimatedTotal() {
        return estimatedTotal;
    }

    public void setEstimatedTotal(BigDecimal estimatedTotal) {
        this.estimatedTotal = estimatedTotal;
    }

    public BigDecimal getEstimatedPerCapita() {
        return estimatedPerCapita;
    }

    public void setEstimatedPerCapita(BigDecimal estimatedPerCapita) {
        this.estimatedPerCapita = estimatedPerCapita;
    }

    public Long getSelectedPlanId() {
        return selectedPlanId;
    }

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

    public String getQrCodeUrl() {
        return qrCodeUrl;
    }

    public void setQrCodeUrl(String qrCodeUrl) {
        this.qrCodeUrl = qrCodeUrl;
    }

    public String getQrToken() {
        return qrToken;
    }

    public void setQrToken(String qrToken) {
        this.qrToken = qrToken;
    }

    public List<DraftFieldResponse> getFields() {
        return fields;
    }

    public void setFields(List<DraftFieldResponse> fields) {
        this.fields = fields;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }
}
