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

import cn.iocoder.yudao.module.smartfactory.controller.admin.packagedata.vo.PackageDataSaveReqVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.util.List;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;

@Schema(description = "管理后台 - 工厂规格数据新增 Request VO")
@Data
public class FactoryDataSizeCreateReqVO {

    @Schema(description = "打包线数据信息")
    private List<PackageDataSaveReqVO> packageData;

    @Schema(description = "规格信息", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<FactoryDataSizeSaveReqVO> items;

    @Schema(description = "工厂编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000078")
    @NotNull(message = "工厂编号不能为空")
    private Long factoryId;

    @Schema(description = "日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "日期不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate date;
}
