package cn.iocoder.yudao.module.mes.controller.admin.machine.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Schema(description = "管理后台 - 机台 Response VO")
@Data
@ExcelIgnoreUnannotated
public class MachineComponentRespVO {

    @Schema(description = "装备id", requiredMode = Schema.RequiredMode.REQUIRED, example = "12527")
    @ExcelProperty("装备id")
    private Long id;
    @Schema(description = "编码", example = "1")
    @ExcelProperty("编码")
    private String code;

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

    @Schema(description = "父id", requiredMode = Schema.RequiredMode.REQUIRED, example = "24628")
    @ExcelProperty("父id")
    private Long parentId;

    @Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("显示顺序")
    private Integer sort;

    @Schema(description = "组织机台ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13753")
    @ExcelProperty("组织机台ID")
    private Long orgId;

    @Schema(description = "装备SN号")
    @ExcelProperty("装备SN号")
    private String serialCode;

    @Schema(description = "出厂日期")
    @ExcelProperty("出厂日期")
    private LocalDateTime outgoingTime;

    @Schema(description = "出厂报告")
    @ExcelProperty("出厂报告")
    private String outgoingReport;

    @Schema(description = "位置")
    @ExcelProperty("位置")
    private String position;

    @Schema(description = "规格")
    @ExcelProperty("规格")
    private String standard;

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

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

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

    @Schema(description = "组织类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty(value = "组织类型", converter = DictConvert.class)
    @DictFormat("mes_machine_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer componentType;

    @Schema(description = "机台类型", example = "1")
    @ExcelProperty(value = "机台类型", converter = DictConvert.class)
    @DictFormat("mes_org_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String machineType;

    @Schema(description = "建议维保时间")
    @ExcelProperty("建议维保时间")
    private Long maintainTime;

    @Schema(description = "建议维保类型(按使用时间，距离上次维保时间)", example = "1")
    @ExcelProperty("建议维保类型(按使用时间，距离上次维保时间)")
    private String maintainType;

    @Schema(description = "建议维保时间单位")
    @ExcelProperty("建议维保时间单位")
    private String maintainTimeUnit;

    @Schema(description = "实际维保时间")
    @ExcelProperty("实际维保时间")
    private Long trueMaintainTime;

    @Schema(description = "实际维保时间单位")
    @ExcelProperty("实际维保时间单位")
    private String trueMaintainTimeUnit;

    @Schema(description = "实际维保类型", example = "1")
    @ExcelProperty("实际维保类型")
    private String trueMaintainTimeType;

    @Schema(description = "上次维保时间")
    @ExcelProperty("上次维保时间")
    private LocalDateTime lastMaitainTime;

    @Schema(description = "模具id")
    private Long moldId;
    @Schema(description = "模具名称")
    @ExcelProperty("模具名称")
    private String moldName;
}