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

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

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

/**
 * @Description: 印刷计划状态枚举类
 * @Author: CaoZixuan
 * @Date: 2021-04-02
 */
public enum PrintPlanStatusEnum {
    NEW("新建"),
    READY("就绪"),
    PRINTING("印刷中"),
    FINISH("印刷完成");
    private final String name;

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

    public String getName() {
        return name;
    }

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