package com.cf.imes.module.executor.controller.admin.plan.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NonNull;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author there
 */
@Data
public class AddPlateReq {

    @NotNull(message = "排单id")
    @Schema(description = "排单id")
    private Long planId;

    @NotEmpty(message = "列表不能空")
    @JsonProperty("list")
    private List<Obj> list;

    @Valid
    @Data
    public static class Obj {
        @NotNull(message = "生产单id不能空")
        @Schema(description = "生产单id")
        private Long orderId;
        @NotNull(message = "板材id不能空")
        @Schema(description = "板材id")
        private Long plateId;
    }
}
