package com.qmth.teachcloud.common.enums;

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

/**
 * 抽卷规则
 *
 * @Date: 2021/3/23.
 */
public enum DrawRuleEnum {

    ONE("只抽一次"),
    CIRCLE("循环抽取");

    DrawRuleEnum(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 (DrawRuleEnum value : DrawRuleEnum.values()) {
            EnumResult result = new EnumResult();
            result.setCode(value.name());
            result.setName(value.getName());
            result.setOrdinal(value.ordinal());
            list.add(result);
        }
        return list;
    }

}
