package ink.wgink.module.dictionary.pojo.vos;

import ink.wgink.annotation.CheckEmptyAnnotation;
import ink.wgink.annotation.CheckNumberAnnotation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @ClassName: DataVO
 * @Description: 字典视图
 * @Author: WangGeng
 * @Date: 2019/3/4 2:30 PM
 * @Version: 1.0
 **/
@ApiModel
public class DataVO {

    @ApiModelProperty(name = "dataParentId", value = "字典上级ID")
    @CheckEmptyAnnotation(name = "字典上级ID")
    private String dataParentId;
    @ApiModelProperty(name = "dataName", value = "字典名称")
    @CheckEmptyAnnotation(name = "字典名称")
    private String dataName;
    @ApiModelProperty(name = "dataSummary", value = "字典说明")
    private String dataSummary;
    @ApiModelProperty(name = "dataSort", value = "字典排序")
    @CheckNumberAnnotation(name = "字典排序")
    private Integer dataSort;

    public String getDataParentId() {
        return dataParentId == null ? "" : dataParentId;
    }

    public void setDataParentId(String dataParentId) {
        this.dataParentId = dataParentId;
    }

    public String getDataName() {
        return dataName == null ? "" : dataName;
    }

    public void setDataName(String dataName) {
        this.dataName = dataName;
    }

    public String getDataSummary() {
        return dataSummary == null ? "" : dataSummary;
    }

    public void setDataSummary(String dataSummary) {
        this.dataSummary = dataSummary;
    }

    public Integer getDataSort() {
        return dataSort;
    }

    public void setDataSort(Integer dataSort) {
        this.dataSort = dataSort;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"dataParentId\":")
                .append("\"").append(dataParentId).append("\"");
        sb.append(",\"dataName\":")
                .append("\"").append(dataName).append("\"");
        sb.append(",\"dataSummary\":")
                .append("\"").append(dataSummary).append("\"");
        sb.append(",\"dataSort\":")
                .append(dataSort);
        sb.append('}');
        return sb.toString();
    }
}
