package com.qmth.distributed.print.business.enums;

import com.qmth.teachcloud.common.enums.EnumResult;

import java.util.ArrayList;
import java.util.List;

/**
 * 推送题卡类型
 */
public enum SyncCardTypeEnum {

    GENERIC("通卡"),
    CUSTOM("电子题卡");

    SyncCardTypeEnum(String desc) {
        this.desc = desc;
    }

    private String desc;

    public String getDesc() {
        return desc;
    }

    /**
     * @return
     */
    public static List<EnumResult> listTypes() {
        List<EnumResult> list = new ArrayList<EnumResult>();
        for (SyncCardTypeEnum value : SyncCardTypeEnum.values()) {
            EnumResult result = new EnumResult();
            result.setName(value.name());
            result.setOrdinal(value.ordinal());
            result.setCode(null);
            result.setDesc(value.getDesc());
            list.add(result);
        }
        return list;
    }

}
