package com.engine.secret.enums;

/**
 * 印制资质
 *
 * @author:dxfeng
 * @createTime: 2025/04/07
 * @version: 1.0
 */
public enum PrintCategory implements CategoryValue {
    // 涉密文件资料、国家统一考试试卷、涉密防伪票据证书、涉密光电磁介质、涉密档案数字化加工
    CLASSIFIED_DOCUMENTS("涉密文件资料", 0),
    NATIONAL_EXAM_PAPERS("国家统一考试试卷", 1),
    CLASSIFIED_VOUCHERS("涉密防伪票据证书", 2),
    SECURE_ELECTRONIC_STORAGE("涉密光电磁介质", 3),
    CLASSIFIED_DIGITIZATION("涉密档案数字化加工", 4);

    PrintCategory(String name, Integer value) {
        this.name = name;
        this.value = value;
    }

    private String name;
    private Integer value;

    public static PrintCategory getValue(String name) {
        for (PrintCategory item : PrintCategory.values()) {
            if (item.name.equalsIgnoreCase(name)) {
                return item;
            }
        }
        //throw new RuntimeException("不支持的操作类型");
        return null;
    }


    @Override
    public int getSelectValue() {
        return value;
    }
}
