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 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 (DrawRuleEnum value : DrawRuleEnum.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;
    }

}
