package com.agileboot.common.core.enums.dictionary;

import com.agileboot.common.core.enums.DictionaryEnum;
import lombok.Data;

/**
 * 字典模型类
 * @author valarchie
 */
@Data
public class DictionaryData {

    private String label;
    private Integer value;
    private String cssTag;

    @SuppressWarnings("rawtypes")
    public DictionaryData(DictionaryEnum enumType) {
        if (enumType != null) {
            this.label = enumType.getDesc();
            this.value = (Integer) enumType.getValue();
            this.cssTag = enumType.getCssTag();
        }
    }

}
