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.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 商品类别
 * </p>
 *
 * @author wulixian
 * @since 2021-03-08
 */
@Data
@ApiModel(value="Category新增对象", description="商品类别")
public class CategorySaveDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "所属上一级系列编号", required = true)
    @NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
    private String categoryId;

    @ApiModelProperty(value = "层级，默认从 1 开始", required = true)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private Integer level;

    @ApiModelProperty(value = "系列名称", required = true)
    @NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
    private String name;

    @ApiModelProperty(value = "缩略图")
    private String thumb;

}
