package com.cf.imes.module.executor.controller.admin.manage.pack.vo;

import com.cf.imes.framework.common.validation.InEnum;
import com.cf.imes.module.executor.enums.OrderItemTypeEnum;
import com.cf.imes.module.executor.enums.pack.PackScanComponentCorrelationTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.util.List;

/**
 *
 *
 * @author Gqr
 * @since 2026/3/18 11:13
 */
@Schema(description = "管理后台 - 分堆打包扫描部件关联 Request VO")
@Data
public class PackScanComponentCorrelationReqVO {

    @InEnum(PackScanComponentCorrelationTypeEnum.class)
    @Schema(description = "扫描类型，0本身、1部件父级、2部件顶级")
    @NotNull(message = "扫描类型不能为空")
    private Integer type;

    @Schema(description = "扫描本体编号")
    @NotNull(message = "扫描本体编号不能为空")
    private String id;

    @InEnum(OrderItemTypeEnum.class)
    @Schema(description = "扫描本体类型")
    @NotNull(message = "扫描本体类型不能为空")
    private Integer itemType;

    @Schema(description = "订单ID列表", requiredMode = Schema.RequiredMode.REQUIRED)
    @Size(max = 100, message = "订单ID列表最大长度为100")
    private List<Long> orderIds;

    @Schema(description = "是否关联加工组")
    private boolean relateGroup;
}
