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

public enum RelationTypeEnum {

    BIND(1, "绑定"),
    UNBIND(9, "解绑"),
    ;
    private int code;
    private String text;

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

    public int getCode() {
        return code;
    }

    public String getText() {
        return text;
    }

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

}
