package com.cm.common.plugin.pojo.vos.datadictionary;

import com.cm.common.annotation.CheckEmptyAnnotation;
import com.cm.common.annotation.CheckNumberAnnotation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

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

    @ApiModelProperty(name = "dictionaryParentId", value = "字典上级ID")
    @CheckEmptyAnnotation(name = "字典上级ID")
    private String dictionaryParentId;
    @ApiModelProperty(name = "dictionaryName", value = "字典名称")
    @CheckEmptyAnnotation(name = "字典名称")
    private String dictionaryName;
    @ApiModelProperty(name = "dictionarySummary", value = "字典说明")
    private String dictionarySummary;
    @ApiModelProperty(name = "dictionarySort", value = "字典排序")
    @CheckNumberAnnotation(name = "字典排序")
    private Integer dictionarySort;

    public String getDictionaryParentId() {
        return dictionaryParentId == null ? "" : dictionaryParentId;
    }

    public void setDictionaryParentId(String dictionaryParentId) {
        this.dictionaryParentId = dictionaryParentId;
    }

    public String getDictionaryName() {
        return dictionaryName == null ? "" : dictionaryName;
    }

    public void setDictionaryName(String dictionaryName) {
        this.dictionaryName = dictionaryName;
    }

    public String getDictionarySummary() {
        return dictionarySummary == null ? "" : dictionarySummary;
    }

    public void setDictionarySummary(String dictionarySummary) {
        this.dictionarySummary = dictionarySummary;
    }

    public Integer getDictionarySort() {
        return dictionarySort;
    }

    public void setDictionarySort(Integer dictionarySort) {
        this.dictionarySort = dictionarySort;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"dictionaryParentId\":")
                .append("\"").append(dictionaryParentId).append("\"");
        sb.append(",\"dictionaryName\":")
                .append("\"").append(dictionaryName).append("\"");
        sb.append(",\"dictionarySummary\":")
                .append("\"").append(dictionarySummary).append("\"");
        sb.append(",\"dictionarySort\":")
                .append(dictionarySort);
        sb.append('}');
        return sb.toString();
    }
}
