package cn.iocoder.yudao.module.mes.controller.admin.stockworkshop.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 StockWorkshopDetailRespVO {

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

    @Schema(description = "原料id", requiredMode = Schema.RequiredMode.REQUIRED, example = "7505")
    private Long itemId;
    @Schema(description = "原料", requiredMode = Schema.RequiredMode.REQUIRED, example = "25972")
    @ExcelProperty("原料")
    private String itemName;

    @Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "28845")
    @ExcelProperty("数量")
    private BigDecimal count;
    //明细后库存数量
    @Schema(description = "库存数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "28845")
    @ExcelProperty("库存数量")
    private BigDecimal stockCount;

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

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

    @Schema(description = "领料单")
    @ExcelProperty("领料单")
    private String itemRequisitionCode;

    @Schema(description = "领料明细id", example = "877")
    @ExcelProperty("领料明细id")
    private Long itemRequisitionDetailId;

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

    @Schema(description = "投料id", example = "19286")
    @ExcelProperty("投料id")
    private Long feedingRecordId;

    @Schema(description = "操作人员", requiredMode = Schema.RequiredMode.REQUIRED, example = "26362")
    private Long userId;
    @Schema(description = "操作人员", requiredMode = Schema.RequiredMode.REQUIRED, example = "26362")
    @ExcelProperty("操作人员")
    private String userName;
    @Schema(description = "操作人员", requiredMode = Schema.RequiredMode.REQUIRED, example = "26362")
    @ExcelProperty("操作人员")
    private String creator;

    @Schema(description = "单据时间")
    @ExcelProperty("单据时间")
    private LocalDateTime operateTime;

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

}