package com.ruoyi.common.enums;


import java.util.Objects;

public enum SceneType implements IIntegerEnum {
    SHOP_INDEX(0, "首页");

    private  int code;
    private  String msg;

    SceneType(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Integer getCode() {
        return code;
    }
    @Override
    public String getMsg() {
        return msg;
    }

    public static SceneType getByCode(Integer code) {
        for (SceneType value : values()) {
            if (Objects.equals(code, value.getCode())) {
                return value;
            }
        }
        throw new IllegalArgumentException("Invalid shelf status code: " + code);
    }
}
