package cn.iocoder.yudao.module.mes.controller.admin.feedingrecord.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.math.BigDecimal;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 投料记录 Response VO")
@Data
@ExcelIgnoreUnannotated
public class FeedingRecordRespVO {

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

    @Schema(description = "单号")
    @ExcelProperty("单号")
    private String feedingRecordCode;

    @Schema(description = "产品id", example = "9099")
    private Long productId;
    @Schema(description = "产品id", example = "9099")
    @ExcelProperty("产品")
    private String productName;

    @Schema(description = "计划id", example = "4922")
    @ExcelProperty("计划id")
    private Long planId;

    @Schema(description = "原料id", example = "26352")
    @ExcelProperty("原料id")
    private Long itemId;

    @Schema(description = "制浆线")
//    @ExcelProperty(value = "制浆线", converter = DictConvert.class)
//    @DictFormat("mes_feeding_pipeline") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Long feedingPipeline;

    @Schema(description = "制浆线名称")
    @ExcelProperty(value = "制浆线名称", converter = DictConvert.class)
    private String feedingPipelineName;

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

    @Schema(description = "重量")
    @ExcelProperty("重量")
    private BigDecimal weight;

    @Schema(description = "投料时间")
    @ExcelProperty("投料时间")
    private LocalDateTime feedingTime;

    @Schema(description = "记录人", example = "13784")
    private Long userId;
    @Schema(description = "记录人", example = "13784")
    @ExcelProperty("记录人")
    private String userName;

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

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

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;
    @Schema(description = "记录人", example = "13784")
    private String creator;

}