package com.fzm.mall.server.admin.goods_center.entity.dto;

import com.fzm.mall.server.admin.constant.MallResponseError;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author wangp
 * @date 2021/3/26 16:33
 * @description 补货
 * @since JDK 1.8
 */
@Data
@ApiModel(value = "StockDTO", description = "库存信息")
public class StockDTO {

    @ApiModelProperty("商品id")
    @NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
    private String goodsId;

    @ApiModelProperty("库存")
    @Min(value = 0, message = MallResponseError.VALUE_LT_0_ERROR)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private Integer stock;
}
