package cn.iocoder.yudao.module.erp.controller.admin.autocode.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;

@Schema(description = "管理后台 - 编码规则组成 Response VO")
@Data
@ExcelIgnoreUnannotated
public class AutocodePartRespVO {

    @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19165")
    @ExcelProperty("ID")
    private Long id;

    @Schema(description = "规则ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11153")
    @ExcelProperty("规则ID")
    private Long ruleId;

    @Schema(description = "分段序号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("分段序号")
    private Integer partIndex;

    @Schema(description = "分段类型", example = "1")
    @ExcelProperty("分段类型")
    private String partType;

    @Schema(description = "分段编号")
    @ExcelProperty("分段编号")
    private String partCode;

    @Schema(description = "分段名称", example = "芋艿")
    @ExcelProperty("分段名称")
    private String partName;

    @Schema(description = "分段长度", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("分段长度")
    private Integer partLength;

    @Schema(description = "日期时间格式")
    @ExcelProperty("日期时间格式")
    private String datetimeFormat;

    @Schema(description = "输入字符")
    @ExcelProperty("输入字符")
    private String inputCharacter;

    @Schema(description = "固定字符")
    @ExcelProperty("固定字符")
    private String fixCharacter;

    @Schema(description = "流水号起始值")
    @ExcelProperty("流水号起始值")
    private Integer seriaStartNo;

    @Schema(description = "流水号步长")
    @ExcelProperty("流水号步长")
    private Integer seriaStep;

    @Schema(description = "流水号当前值")
    @ExcelProperty("流水号当前值")
    private Integer seriaNowNo;

    @Schema(description = "流水号是否循环")
    @ExcelProperty("流水号是否循环")
    private String cycleFlag;

    @Schema(description = "循环方式")
    @ExcelProperty(value = "循环方式", converter = DictConvert.class)
    @DictFormat("erp__autocode_cyclemethod") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String cycleMethod;

    @Schema(description = "备注", example = "你说的对")
    @ExcelProperty("备注")
    private String remark;

    @Schema(description = "是否启用", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "是否启用", converter = DictConvert.class)
    @DictFormat("infra_boolean_string") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Boolean isEnable;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}