package com.prolog.eis.enums.base;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum BaseVisitEnum {

    INVISIBLE("0", "不可见"),
    VISIBLE("1", "可见"),
    ;

    /**
     * 是否锁定(0:不可见  1:可见)
     */
    private final String code;
    /**
     * 描述
     */
    private final String describe;


    public static BaseVisitEnum getByCode(Integer code) {
        BaseVisitEnum statusEnum = null;

        for (BaseVisitEnum value : values()) {
            if (value.getCode().equals(code)) {
                statusEnum = value;
            }
        }
        return statusEnum;
    }
}
