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

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import java.math.BigDecimal;
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;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 模具 Response VO")
@Data
@ExcelIgnoreUnannotated
public class MoldRespVO {

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

    @Schema(description = "模具编码", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("模具编码")
    private String code;

    @Schema(description = "模具名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
    @ExcelProperty("模具名称")
    private String name;

    @Schema(description = "单位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19527")
    private Long unitId;
    @Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED, example = "个")
//    @ExcelProperty("单位")
    private String unitName;

    @Schema(description = "设备ID", example = "24428")
    private Long machineId;

    @Schema(description = "设备名称", example = "24428")
    @ExcelProperty("使用设备")
    private String machineName;

    @Schema(description = "使用次数/次")
    @ExcelProperty("使用次数/次")
    private BigDecimal useTime;

    @Schema(description = "入库时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("入库时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDateTime inTime;

    @Schema(description = "状态", example = "1")
    @ExcelProperty(value = "状态", converter = DictConvert.class)
    @DictFormat("erp_mold_status") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer status;

    @Schema(description = "模具图片")
//    @ExcelProperty("模具图片")
    private String images;

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

    @Schema(description = "是否启用", requiredMode = Schema.RequiredMode.REQUIRED)
//    @ExcelProperty("是否启用")
    private Boolean isEnable;

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

    @Schema(description = "型号id", requiredMode = Schema.RequiredMode.REQUIRED, example = "15258")
    private Long brandId;

    @Schema(description = "型号", requiredMode = Schema.RequiredMode.REQUIRED, example = "15258")
    @ExcelProperty("型号")
    private String brandName;

    @Schema(description = "附件地址")
    @ExcelProperty("附件地址")
    private String fileUrl;

}