package com.macro.mall.dto;

import com.macro.mall.validator.FlagValidator;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import java.util.List;

/**
 * 添加更新产品分类的参数
 * Created by macro on 2018/4/26.
 */
public class PmsProductCategoryParam {
    @ApiModelProperty("父分类的编号")
    private Long parentId;
    @ApiModelProperty(value = "商品分类名称",required = true)
    @NotEmpty(message = "商品分类名称不能为空")
    private String name;
    @ApiModelProperty("分类单位")
    private String productUnit;
    @ApiModelProperty("是否在导航栏显示")
    @FlagValidator(value = {"0","1"},message = "状态只能为0或1")
    private Integer navStatus;
    @ApiModelProperty("是否进行显示")
    @FlagValidator(value = {"0","1"},message = "状态只能为0或1")
    private Integer showStatus;
    @ApiModelProperty("排序")
    @Min(value = 0,message = "排序最小为0")
    private Integer sort;
    @ApiModelProperty("图标")
    private String icon;
    @ApiModelProperty("关键字")
    private String keywords;
    @ApiModelProperty("描述")
    private String description;
    @ApiModelProperty("产品相关筛选属性集合")
    private List<Long> productAttributeIdList;

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getProductUnit() {
        return productUnit;
    }

    public void setProductUnit(String productUnit) {
        this.productUnit = productUnit;
    }

    public Integer getNavStatus() {
        return navStatus;
    }

    public void setNavStatus(Integer navStatus) {
        this.navStatus = navStatus;
    }

    public Integer getShowStatus() {
        return showStatus;
    }

    public void setShowStatus(Integer showStatus) {
        this.showStatus = showStatus;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getKeywords() {
        return keywords;
    }

    public void setKeywords(String keywords) {
        this.keywords = keywords;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public List<Long> getProductAttributeIdList() {
        return productAttributeIdList;
    }

    public void setProductAttributeIdList(List<Long> productAttributeIdList) {
        this.productAttributeIdList = productAttributeIdList;
    }
}

@@ -116,16 +116,69 @@
 roperty;
+%0Aimport lombok.Data;%0Aimport lombok.EqualsAndHashCode;
 %0A%0Aimport
@@ -339,16 +339,60 @@
 26.%0A */%0A
+@Data%0A@EqualsAndHashCode(callSuper = false)%0A
 public c
@@ -1209,16 +1209,16 @@
 %E9%80%89%E5%B1%9E%E6%80%A7%E9%9B%86%E5%90%88%22)%0A
+
     priv
@@ -1259,1623 +1259,7 @@
 ist;
-%0A%0A    public Long getParentId() %7B%0A        return parentId;%0A    %7D%0A%0A    public void setParentId(Long parentId) %7B%0A        this.parentId = parentId;%0A    %7D%0A%0A    public String getName() %7B%0A        return name;%0A    %7D%0A%0A    public void setName(String name) %7B%0A        this.name = name;%0A    %7D%0A%0A    public String getProductUnit() %7B%0A        return productUnit;%0A    %7D%0A%0A    public void setProductUnit(String productUnit) %7B%0A        this.productUnit = productUnit;%0A    %7D%0A%0A    public Integer getNavStatus() %7B%0A        return navStatus;%0A    %7D%0A%0A    public void setNavStatus(Integer navStatus) %7B%0A        this.navStatus = navStatus;%0A    %7D%0A%0A    public Integer getShowStatus() %7B%0A        return showStatus;%0A    %7D%0A%0A    public void setShowStatus(Integer showStatus) %7B%0A        this.showStatus = showStatus;%0A    %7D%0A%0A    public Integer getSort() %7B%0A        return sort;%0A    %7D%0A%0A    public void setSort(Integer sort) %7B%0A        this.sort = sort;%0A    %7D%0A%0A    public String getIcon() %7B%0A        return icon;%0A    %7D%0A%0A    public void setIcon(String icon) %7B%0A        this.icon = icon;%0A    %7D%0A%0A    public String getKeywords() %7B%0A        return keywords;%0A    %7D%0A%0A    public void setKeywords(String keywords) %7B%0A        this.keywords = keywords;%0A    %7D%0A%0A    public String getDescription() %7B%0A        return description;%0A    %7D%0A%0A    public void setDescription(String description) %7B%0A        this.description = description;%0A    %7D%0A%0A    public List%3CLong%3E getProductAttributeIdList() %7B%0A        return productAttributeIdList;%0A    %7D%0A%0A    public void setProductAttributeIdList(List%3CLong%3E productAttributeIdList) %7B%0A        this.productAttributeIdList = productAttributeIdList;%0A    %7D
 %0A%7D%0A

Update PmsProductCategoryParam.java