/*
 * Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 * 未经允许,不可做商业用途！
 *
 * 版权所有,侵权必究！
 */

package com.yami.shop.bean.param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;

/**
 * 手动拆单请求参数
 *
 * @author
 */
@Data
@ApiModel("手动拆单请求参数")
public class ManualSplitOrderParam implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "父订单号", required = true)
    @NotBlank(message = "订单号不能为空")
    private String orderNumber;

    @ApiModelProperty(value = "子订单项列表", required = true)
    @NotEmpty(message = "子订单项列表不能为空")
    private List<ManualSplitOrderItemParam> orderItems;

    @ApiModelProperty(value = "拆单操作用户", required = true)
    @NotBlank(message = "拆单操作用户不能为空")
    private Long splitUserId;
    /**
     * 手动拆单订单项参数
     */
    @Data
    @ApiModel("手动拆单订单项参数")
    public static class ManualSplitOrderItemParam implements Serializable {

        private static final long serialVersionUID = 1L;

        @ApiModelProperty(value = "商品SKU ID", required = true)
        private Long skuId;

        @ApiModelProperty(value = "商品数量", required = true)
        private Integer prodCount;
    }
}
