package org.springblade.modules.app.common.enums;

public enum ApplicationStateEnum {

    UNCHECK(0, "未审核"),
    PASS(1, "审核通过"),
    REJECT(2, "驳回"),
    CANCEL(3, "撤销"),
    ;
    private int code;
    private String text;

    ApplicationStateEnum(int code, String text) {
        this.code = code;
        this.text = text;
    }

    public int getCode() {
        return code;
    }

    public String getText() {
        return text;
    }

    public static ApplicationStateEnum findByCode(int code) {
        for (ApplicationStateEnum demoEnum : values()) {
            if (code == demoEnum.getCode()) {
                return demoEnum;
            }
        }
        return null;
    }

}
