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

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

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

/**
 * 题卡制作方式
 *
 * @Date: 2021/3/23.
 */
public enum MakeMethodEnum {

    SELECT("选择已有题卡"),
    SELF("自助创建");

    MakeMethodEnum(String name) {
        this.name = name;
    }

    private String name;

    public String getName() {
        return name;
    }

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

}
