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("印刷中"),
    PRINT_FINISH("印刷完成"),
    END("已结束")
    ;
    private final String desc;

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

    public String getDesc() {
        return desc;
    }
    public static List<EnumResult> listTypes() {
        List<EnumResult> list = new ArrayList<>();
        for (PrintPlanStatusEnum value : PrintPlanStatusEnum.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;
    }
}
