package cn.iocoder.yudao.module.smartfactory.controller.admin.factorydata.vo.sizeData;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

@Schema(description = "管理后台 - 工厂规格数据编辑用 Request VO")
@Data
public class FactoryDataSizeDetailRespVO {

    @Schema(description = "工厂id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000078")
    private Long factoryId;

    @Schema(description = "工厂名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "新景象")
    private String factoryName;

    @Schema(description = "日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-05-14")
    private LocalDate date;

    @Schema(description = "是否可编辑 | 0否 1是", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Integer isEdit;

    /**
     * 入库数据
     */
    private List<InItem> InItems;

    /**
     * 出库数据
     */
    private List<OutItem> OutItems;

    @Data
    public static class InItem {

        @Schema(description = "规格id")
        private Long sizeId;

        @Schema(description = "规格名称")
        private String sizeName;

        @Schema(description = "入库数Id")
        private Long inNumId;

        @Schema(description = "入库数")
        private Integer inNum;

        @Schema(description = "入库平方数")
        private BigDecimal squareNum;

        @Schema(description = "打包破损数")
        private Integer damageNum;

        @Schema(description = "入库破损数id")
        private Long inDamageNumId;

        @Schema(description = "入库破损数")
        private Integer inDamageNum;

        @Schema(description = "是否可编辑 | 0否 1是")
        private Integer isEnable = 0;
    }

    @Data
    public static class OutItem {

        @Schema(description = "规格id")
        private Long sizeId;

        @Schema(description = "规格名称")
        private String sizeName;

        @Schema(description = "出库数id")
        private Long outNumId;

        @Schema(description = "出库数量")
        private Integer outNum;

        @Schema(description = "出库破损数id")
        private Long outDamageNumId;

        @Schema(description = "出库破损数")
        private Integer outDamageNum;
    }
}
