package com.macro.mall.dto;

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

import javax.validation.constraints.NotEmpty;

/**
 * 商品属性参数
 * Created by macro on 2018/4/26.
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class PmsProductAttributeParam {
    @ApiModelProperty("属性分类ID")
    @NotEmpty(message = "属性分类不能为空")
    private Long productAttributeCategoryId;
    @ApiModelProperty("属性名称")
    @NotEmpty(message = "属性名称不能为空")
    private String name;
    @ApiModelProperty("属性选择类型：0->唯一；1->单选；2->多选")
    @FlagValidator({"0","1","2"})
    private Integer selectType;
    @ApiModelProperty("属性录入方式：0->手工录入；1->从列表中选取")
    @FlagValidator({"0","1"})
    private Integer inputType;
    @ApiModelProperty("可选值列表，以逗号隔开")
    private String inputList;

    private Integer sort;
    @ApiModelProperty("分类筛选样式：0->普通；1->颜色")
    @FlagValidator({"0","1"})
    private Integer filterType;
    @ApiModelProperty("检索类型；0->不需要进行检索；1->关键字检索；2->范围检索")
    @FlagValidator({"0","1","2"})
    private Integer searchType;
    @ApiModelProperty("相同属性产品是否关联；0->不关联；1->关联")
    @FlagValidator({"0","1"})
    private Integer relatedStatus;
    @ApiModelProperty("是否支持手动新增；0->不支持；1->支持")
    @FlagValidator({"0","1"})
    private Integer handAddStatus;
    @ApiModelProperty("属性的类型；0->规格；1->参数")
    @FlagValidator({"0","1"})
    private Integer type;
}

@@ -354,16 +354,30 @@
 Param %7B%0A
+    @NotEmpty%0A
     @Api
@@ -404,44 +404,8 @@
 D%22)%0A
-    @NotEmpty(message = %22%E5%B1%9E%E6%80%A7%E5%88%86%E7%B1%BB%E4%B8%8D%E8%83%BD%E4%B8%BA%E7%A9%BA%22)%0A
     
@@ -445,16 +445,30 @@
 goryId;%0A
+    @NotEmpty%0A
     @Api
@@ -497,64 +497,62 @@
     
-@NotEmpty(message = %22%E5%B1%9E%E6%80%A7%E5%90%8D%E7%A7%B0%E4%B8%8D%E8%83%BD%E4%B8%BA%E7%A9%BA%22)%0A    private String name;
+private String name;%0A    @FlagValidator(%7B%220%22,%221%22,%222%22%7D)
 %0A   
@@ -602,42 +602,8 @@
 %E9%80%89%22)%0A
-    @FlagValidator(%7B%220%22,%221%22,%222%22%7D)%0A
     
@@ -626,24 +626,54 @@
 selectType;%0A
+    @FlagValidator(%7B%220%22,%221%22%7D)%0A
     @ApiMode
@@ -714,38 +714,8 @@
 %E5%8F%96%22)%0A
-    @FlagValidator(%7B%220%22,%221%22%7D)%0A
     
@@ -808,17 +808,16 @@
 utList;%0A
-%0A
     priv

Update PmsProductAttributeParam.java