package org.qinan.safetyeval.domain.constant;

/**
 * 审核结果枚举
 *
 * @author safety-eval
 */
public enum QualFilingReviewResultEnum {

    PASS(1, "通过"),
    PENDING(2, "待定"),
    REJECT(3, "不通过");

    private final int code;
    private final String name;

    public static final String REMARKS = "审核结果(1通过2待定3不通过)";

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

    public int getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

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