package com.yeejoin.amos.boot.biz.common.enums;

import lombok.AllArgsConstructor;

/**
 * @description:
 * @author: tw
 * @createDate: 2021/9/8
 */

@AllArgsConstructor
public enum HomePageEnum {

    DISPATCHALARM("dispatchAlarm", "com.yeejoin.amos.boot.module.jcs.biz.service.impl.DispatchMapServiceImpl"),
    DISPATCHTASK("dispatchTask", "com.yeejoin.amos.boot.module.jcs.biz.service.impl.DispatchMapServiceImpl"),
    FIREALARM("fireAlarm", "com.yeejoin.amos.boot.module.jcs.biz.service.impl.DispatchMapServiceImpl"),
    FAULT("fault", "com.yeejoin.amos.boot.module.jcs.biz.service.impl.DispatchMapServiceImpl"),
    SHIELD("shield", "com.yeejoin.amos.boot.module.jcs.biz.service.impl.DispatchMapServiceImpl"),
    WARNING("warning", "com.yeejoin.amos.boot.module.jcs.biz.service.impl.DispatchMapServiceImpl"),
    NO("no", "com.yeejoin.amos.boot.module.jcs.biz.service.impl.DispatchMapServiceImpl"),
    YES("yes", "com.yeejoin.amos.boot.module.jcs.biz.service.impl.DispatchMapServiceImpl");






    private String code;//对应菜单组件名称
    private String url;//组件值对应实现类的包名

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }


    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public static HomePageEnum statOf(String code) {
            for (HomePageEnum state : values())
                if (state.getCode().equals(code))
                    return state;
            return null;
        }

}
