package com.yihu.hos.web.framework.model;

import java.io.Serializable;
import java.util.List;

/**
 * 返回字典对象
 * Created by chenweida on 2016/1/13.
 */
public class DictionaryResult extends Result implements Serializable {

    private String name;
    private List<DictItem> detailModelList;

    public DictionaryResult()
    {}

    public static DictionaryResult success(String message) {
        DictionaryResult dictionaryResult = new DictionaryResult();
        dictionaryResult.setSuccessFlg(true);
        dictionaryResult.setMessage(message);
        return dictionaryResult;
    }

    public static DictionaryResult error(String message) {
        DictionaryResult dictionaryResult = new DictionaryResult();
        dictionaryResult.setSuccessFlg(false);
        dictionaryResult.setMessage(message);
        return dictionaryResult;
    }

    public DictionaryResult(String name)
    {
        this.name=name;
    }

    public List<DictItem> getDetailModelList() {
        return detailModelList;
    }

    public void setDetailModelList(List<DictItem> detailModelList) {
        this.detailModelList = detailModelList;
    }

    public String getName() {
        return name;
    }

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


