package cn.iocoder.yudao.module.iot.controller.admin.formula.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 FormulaRespVO {

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

    @Schema(description = "公式名称", example = "王五")
    @ExcelProperty("公式名称")
    private String name;

    @Schema(description = "公式编号")
    @ExcelProperty("公式编号")
    private String formulaCode;

    @Schema(description = "公式")
    @ExcelProperty("公式")
    private String formula;

    @Schema(description = "结果类型（产量，电耗，浆耗，水耗，气耗，参数）", example = "1")
    @ExcelProperty(value = "结果类型（产量，电耗，浆耗，水耗，气耗，参数）", converter = DictConvert.class)
    @DictFormat("mes_data_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String resultType;
    @Schema(description = "单位")
    @ExcelProperty("单位")
    private String dataUnit;

    @Schema(description = "机台ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12374")
    @ExcelProperty("机台ID")
    private Long machineId;

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

}