package org.linlinjava.jz.db.dto.hm;

import lombok.Data;

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

/**
 * @author lu
 */
@Data
public class HmSetTaskItemsDTO {
    @NotNull(message = "订单orderNo不能为空")
    private String orderNo;

    @NotNull(message = "任务类型不能为空")
    private Integer taskType;

    @Valid
    private List<TaskItem> taskItems;

    @Data
    public static class TaskItem {
        @NotNull(message = "种类id不能为空")
        private Long categoryId;
        @Valid
        private List<Item> itemIds;
    }

    @Data
    public static class Item {
        @NotBlank(message = "itemId不能为空")
        private String itemId;
        @NotNull(message = "是否选择不能为空")
        private Integer choose;
    }
}
