package com.prolog.eis.enums.base;

import lombok.Getter;

/**
 * @program: eis-dsl-parent
 * @description: 通用状态
 * @author: Xiong
 * @create: 2021-12-30 17:28
 **/
public enum BaseInBoundStatusEnum {
    STATUS_CACHE(15, "缓存区"),

    ;
    @Getter
    private Integer code;
    @Getter
    private String msg;

    BaseInBoundStatusEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

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

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