package org.qinan.safetyeval.domain.constant;

/**
 * 备案 5 步表单步骤
 */
public enum QualFilingFormStepEnum {

    BASIC_INFO(1, "备案基本信息"),
    MATERIALS(2, "备案材料上传"),
    COMMITMENT(3, "法定代表人承诺书"),
    PERSONNEL(4, "备案人员管理"),
    EQUIPMENT(5, "装备清单");

    private final int code;
    private final String name;

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

    public int getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

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