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/25 15:46
 * @description 积分兑换
 * @since JDK 1.8
 */
@Data
@ApiModel(value = "IntegralExchangeDTO", description = "商品积分兑换信息")
public class IntegralExchangeDTO {

    @ApiModelProperty("商品名称")
    @NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
    private String name;

    @ApiModelProperty("商品描述")
    @NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
    private String description;

    @ApiModelProperty("缩略图")
    @NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
    private String thumb;

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

    @ApiModelProperty("积分数量")
    @Min(value = 0, message = MallResponseError.VALUE_LT_0_ERROR)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private Integer pNum;

}
