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

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

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

@Schema(description = "登记批次详情（进度管理）")
public class RegistrationBatchDetailResponse {

    @JsonProperty("draft_id")
    @Schema(description = "关联草稿 ID")
    private Long draftId;

    @JsonProperty("batch_id")
    @Schema(description = "批次主键 ID")
    private Long batchId;

    @JsonProperty("batch_no")
    @Schema(description = "批次业务编号", example = "bat_1")
    private String batchNo;

    @Schema(description = "批次/订单标题", example = "浦东仓库搬运")
    private String title;

    @Schema(description = "页头副标题：标题 + 批次号", example = "浦东仓库搬运 bat_1")
    private String subtitle;

    @JsonProperty("order_id")
    @Schema(description = "订单主键 ID")
    private Long orderId;

    @JsonProperty("order_no")
    @Schema(description = "订单编号")
    private String orderNo;

    @Schema(description = "批次状态：active / expired / closed")
    private String status;

    @JsonProperty("qr_code_url")
    @Schema(description = "小程序码图片 URL")
    private String qrCodeUrl;

    @JsonProperty("registration_url")
    @Schema(description = "临时工登记页 path")
    private String registrationUrl;

    @JsonProperty("qr_token")
    @Schema(description = "扫码 scene / token")
    private String qrToken;

    @JsonProperty("valid_from")
    private LocalDateTime validFrom;

    @JsonProperty("valid_until")
    private LocalDateTime validUntil;

    @JsonProperty("current_step_code")
    @Schema(description = "订单当前流程步骤编码")
    private String currentStepCode;

    @Schema(description = "人数统计（待登记 / 登记中 / 已完成 / 总计）")
    private RegistrationBatchStatsResponse stats;

    @Schema(description = "登记进度条")
    private RegistrationBatchProgressResponse progress;

    @Schema(description = "办理流程步骤")
    private List<RegistrationBatchStepResponse> steps = new ArrayList<>();

    @Schema(description = "人员列表")
    private List<RegistrationBatchWorkerItemResponse> workers = new ArrayList<>();

    public Long getDraftId() {
        return draftId;
    }

    public void setDraftId(Long draftId) {
        this.draftId = draftId;
    }

    public Long getBatchId() {
        return batchId;
    }

    public void setBatchId(Long batchId) {
        this.batchId = batchId;
    }

    public String getBatchNo() {
        return batchNo;
    }

    public void setBatchNo(String batchNo) {
        this.batchNo = batchNo;
    }

    public String getTitle() {
        return title;
    }

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

    public String getSubtitle() {
        return subtitle;
    }

    public void setSubtitle(String subtitle) {
        this.subtitle = subtitle;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getStatus() {
        return status;
    }

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

    public String getQrCodeUrl() {
        return qrCodeUrl;
    }

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

    public String getRegistrationUrl() {
        return registrationUrl;
    }

    public void setRegistrationUrl(String registrationUrl) {
        this.registrationUrl = registrationUrl;
    }

    public String getQrToken() {
        return qrToken;
    }

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

    public LocalDateTime getValidFrom() {
        return validFrom;
    }

    public void setValidFrom(LocalDateTime validFrom) {
        this.validFrom = validFrom;
    }

    public LocalDateTime getValidUntil() {
        return validUntil;
    }

    public void setValidUntil(LocalDateTime validUntil) {
        this.validUntil = validUntil;
    }

    public String getCurrentStepCode() {
        return currentStepCode;
    }

    public void setCurrentStepCode(String currentStepCode) {
        this.currentStepCode = currentStepCode;
    }

    public RegistrationBatchStatsResponse getStats() {
        return stats;
    }

    public void setStats(RegistrationBatchStatsResponse stats) {
        this.stats = stats;
    }

    public RegistrationBatchProgressResponse getProgress() {
        return progress;
    }

    public void setProgress(RegistrationBatchProgressResponse progress) {
        this.progress = progress;
    }

    public List<RegistrationBatchStepResponse> getSteps() {
        return steps;
    }

    public void setSteps(List<RegistrationBatchStepResponse> steps) {
        this.steps = steps;
    }

    public List<RegistrationBatchWorkerItemResponse> getWorkers() {
        return workers;
    }

    public void setWorkers(List<RegistrationBatchWorkerItemResponse> workers) {
        this.workers = workers;
    }
}
