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.*;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author wangp
 * @date 2021/3/9 14:56
 * @description 商品规格信息
 * @since JDK 1.8
 */
@Data
@ApiModel(value = "GoodsSku商品规格", description = "商品规格信息")
public class GoodsSkuDTO {

    @ApiModelProperty("规格编号")
    private String skuId;

    @ApiModelProperty("原价")
    @DecimalMin(value = "0", message = MallResponseError.VALUE_LT_0_ERROR)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private BigDecimal originalPrice;

    @ApiModelProperty("重量")
//    @DecimalMin(value = "0", message = MallResponseError.VALUE_LT_0_ERROR)
//    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private BigDecimal weight;

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

    @ApiModelProperty("外部token编号")
    private String commodityPassId;

    @ApiModelProperty("商品币名称")
    private String coinName;

    @ApiModelProperty("规格缩略图")
//    @NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
    private String image;

    @ApiModelProperty("规格属性列表")
    @NotEmpty(message = MallResponseError.NULL_PARAM_ERROR)
    private List<SkuPropertyDTO> propertyList;

    @ApiModelProperty("是否重发")
    private Boolean republish;

    @ApiModelProperty("nft销售方式（1.原商品销售 2.拷贝销售）")
    private Integer nftSalesType;

}
