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

import com.fzm.mall.server.admin.annotation.CustomType;
import com.fzm.mall.server.admin.constant.MALLGlobalConfig;
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.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author wangp
 * @date 2021/3/16 11:04
 * @description 上下架
 * @since JDK 1.8
 */
@Data
@ApiModel(value = "OnOffDTO", description = "上下架信息")
public class OnOffDTO {

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

    @ApiModelProperty("上下架参数")
    @CustomType(pType = MALLGlobalConfig.ON_OFF, message = MallResponseError.PARAM_ERROR)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private Integer type;
}
