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 AutocodeRuleRespVO {

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

    @Schema(description = "规则编码")
    @ExcelProperty("规则编码")
    private String ruleCode;

    @Schema(description = "规则名称", example = "张三")
    @ExcelProperty("规则名称")
    private String ruleName;

    @Schema(description = "描述")
    @ExcelProperty("描述")
    private String ruleDesc;

    @Schema(description = "最大长度")
    @ExcelProperty("最大长度")
    private Integer maxLength;

    @Schema(description = "是否补齐")
    @ExcelProperty(value = "是否补齐", converter = DictConvert.class)
    @DictFormat("erp_autocode_is_padding") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String isPadded;

    @Schema(description = "补齐字符")
    @ExcelProperty("补齐字符")
    private String paddedChar;

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

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

}