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

public enum RelationStateEnum {

    UNCHECK(0, "待确认"),
    BIND(1, "已绑定"),
    REJECT(9, "已拒绝"),
    ;
    private int code;
    private String text;

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

    public int getCode() {
        return code;
    }

    public String getText() {
        return text;
    }

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

}
