package com.neusoft.smart.pos.dto.inventory.request;

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

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

@Data
@ApiModel
public class BatchCreateRetailGoodsRequest {
    
    @ApiModelProperty(value = "门店id")
    private Integer store;
    
    @NotNull(message = "数据不能为空")
    @ApiModelProperty(value = "创建数据")
    private List<Item> data;
    
    @Data
    public static class Item {
        
        @NotNull(message = "条码不能为空")
        @ApiModelProperty(value = "条码", required = true)
        protected String barCode;
        
        @NotNull(message = "商品名不能为空")
        @ApiModelProperty(value = "商品名称", required = true)
        protected String name;
        
        @NotNull(message = "商品价格不能为空")
        @ApiModelProperty(value = "商品价格", required = true)
        protected BigDecimal price;
        
        @NotNull(message = "商品规格不能为空")
        @ApiModelProperty(value = "商品规格", required = true)
        protected String unit;
        
        @NotNull(message = "商品类别不能为空")
        @ApiModelProperty(value = "商品类别名", required = true)
        protected Integer categoryId;
    
        @NotNull(message = "是否库存管理不能为空")
        @ApiModelProperty(value = "是否库存管理", required = true)
        private Integer isStock;
    
        @NotNull(message = "商品规格精度不能为空")
        @ApiModelProperty(value = "商品规格精度", required = true)
        private Integer scale;
        
    }
}
