package org.qinan.safetyeval.domain.constant;

/**
 * 备案申请类型
 */
public enum QualFilingApplyTypeEnum {

    APPLICATION(1, "资质备案申请"),
    CHANGE_DRAFT(2, "变更备案草稿"),
    FILED_MANAGE(3, "已备案资质填报");

    private final int code;
    private final String name;

    QualFilingApplyTypeEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static QualFilingApplyTypeEnum ofCode(Integer code) {
        if (code == null) {
            return null;
        }
        for (QualFilingApplyTypeEnum item : values()) {
            if (item.code == code) {
                return item;
            }
        }
        return null;
    }
}
